Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dbformat
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ESS EPICS Environment
dbformat
Commits
9555e81a
Commit
9555e81a
authored
2 years ago
by
Douglas Araujo
Browse files
Options
Downloads
Plain Diff
Merge branch 'add_version_output' into 'main'
6-add-option-to-show-dbformat-version Closes
#6
See merge request
!11
parents
e84bafc4
a9b2a37c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!11
6-add-option-to-show-dbformat-version
Pipeline
#139108
passed
2 years ago
Stage: check
Stage: test
Stage: build
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.pre-commit-config.yaml
+3
-8
3 additions, 8 deletions
.pre-commit-config.yaml
dbformat/__init__.py
+7
-0
7 additions, 0 deletions
dbformat/__init__.py
pyproject.toml
+4
-0
4 additions, 0 deletions
pyproject.toml
setup.cfg
+0
-5
0 additions, 5 deletions
setup.cfg
with
14 additions
and
13 deletions
.pre-commit-config.yaml
+
3
−
8
View file @
9555e81a
...
...
@@ -3,18 +3,13 @@ repos:
rev
:
22.8.0
hooks
:
-
id
:
black
-
repo
:
https://github.com/
PyCQA/flake8.g
it
rev
:
5
.0.
4
-
repo
:
https://github.com/
charliermarsh/ruff-pre-comm
it
rev
:
v0
.0.
238
hooks
:
-
id
:
flake8
-
id
:
ruff
-
repo
:
https://github.com/pre-commit/pre-commit-hooks
rev
:
v4.3.0
hooks
:
-
id
:
end-of-file-fixer
-
id
:
trailing-whitespace
-
id
:
check-json
-
repo
:
https://github.com/PyCQA/isort.git
rev
:
5.10.1
hooks
:
-
id
:
isort
args
:
[
"
--profile"
,
"
black"
]
This diff is collapsed.
Click to expand it.
dbformat/__init__.py
+
7
−
0
View file @
9555e81a
...
...
@@ -6,8 +6,12 @@ import re
from
pathlib
import
Path
from
typing
import
Optional
,
Sequence
,
Tuple
from
pkg_resources
import
get_distribution
from
dbformat
import
rules
__version__
=
get_distribution
(
__name__
).
version
GUIDELINES
=
json
.
loads
((
Path
(
__file__
).
parent
/
"
guidelines.json
"
).
read_text
())
...
...
@@ -60,6 +64,9 @@ def print_guidelines() -> None:
def
main
(
argv
:
Optional
[
Sequence
[
str
]]
=
None
)
->
int
:
parser
=
argparse
.
ArgumentParser
()
parser
.
add_argument
(
"
-V
"
,
"
--version
"
,
action
=
"
version
"
,
version
=
f
"
{
__name__
}
{
__version__
}
"
)
parser
.
add_argument
(
"
filenames
"
,
nargs
=
"
*
"
,
type
=
Path
,
help
=
"
filenames to check
"
)
parser
.
add_argument
(
"
--print-guidelines
"
,
action
=
"
store_true
"
,
help
=
"
print guidelines and exit
"
...
...
This diff is collapsed.
Click to expand it.
pyproject.toml
+
4
−
0
View file @
9555e81a
...
...
@@ -4,3 +4,7 @@ requires = [
"wheel"
]
build-backend
=
"setuptools.build_meta"
[tool.ruff]
extend-select
=
[
"D212"
]
extend-ignore
=
[
"D105"
,
"D107"
,
"D202"
,
"D418"
,
"E501"
]
This diff is collapsed.
Click to expand it.
setup.cfg
+
0
−
5
View file @
9555e81a
...
...
@@ -26,8 +26,3 @@ dev =
pytest
pytest-cov
pre-commit
[flake8]
ignore
=
E501, E203, W503
# E501, E203: black
# W503: PEP8
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment