Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
python-poetry
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
python-poetry
Commits
f38c3b6e
Commit
f38c3b6e
authored
Nov 13, 2021
by
Bjorn Neergaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(ci): modernize pre-commit and mypy config
parent
2589eb67
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
77 additions
and
102 deletions
+77
-102
.pre-commit-config.yaml
+36
-30
mypy.ini
+0
-49
pyproject.toml
+41
-23
No files found.
.pre-commit-config.yaml
View file @
f38c3b6e
ci
:
autofix_prs
:
false
repos
:
-
repo
:
https://github.com/pre-commit/pre-commit-hooks
rev
:
v4.0.1
hooks
:
-
id
:
trailing-whitespace
-
id
:
end-of-file-fixer
-
id
:
check-merge-conflict
-
id
:
check-case-conflict
-
id
:
check-toml
-
id
:
check-json
-
id
:
pretty-format-json
args
:
[
--autofix
,
--no-ensure-ascii
,
--no-sort-keys
]
-
id
:
check-ast
-
id
:
debug-statements
-
repo
:
https://github.com/pre-commit/pygrep-hooks
rev
:
v1.9.0
hooks
:
-
id
:
python-check-blanket-type-ignore
-
id
:
python-check-mock-methods
-
repo
:
https://github.com/pycqa/isort
rev
:
5.10.1
hooks
:
-
id
:
isort
types
:
[
python
]
# FIXME: pyi support that doesn't conflict with black
-
repo
:
https://github.com/psf/black
rev
:
2
0.8b1
rev
:
2
1.10b0
hooks
:
-
id
:
black
-
repo
:
https://git
la
b.com/pycqa/flake8
rev
:
3.8.4
-
repo
:
https://git
hu
b.com/pycqa/flake8
rev
:
4.0.1
hooks
:
-
id
:
flake8
additional_dependencies
:
[
flake8-bugbear
]
additional_dependencies
:
-
flake8-bugbear
-
repo
:
https://github.com/pre-commit/mirrors-mypy
rev
:
v0.910
rev
:
v0.910
-1
hooks
:
-
id
:
mypy
pass_filenames
:
false
additional_dependencies
:
-
types-dataclasses
-
types-requests
args
:
-
poetry
-
repo
:
https://github.com/timothycrosley/isort
rev
:
5.7.0
hooks
:
-
id
:
isort
additional_dependencies
:
[
toml
]
exclude
:
^.*/?setup\.py$
-
repo
:
https://github.com/pre-commit/pre-commit-hooks
rev
:
v3.4.0
hooks
:
-
id
:
trailing-whitespace
exclude
:
|
(?x)(
^tests/.*/fixtures/.*
| ^tests/console/commands/debug/test_resolve.py
)
-
id
:
end-of-file-fixer
exclude
:
^tests/.*/fixtures/.*
-
id
:
debug-statements
ci
:
autofix_prs
:
false
mypy.ini
deleted
100644 → 0
View file @
2589eb67
[mypy]
check_untyped_defs
=
True
ignore_errors
=
False
ignore_missing_imports
=
True
strict_optional
=
True
warn_unused_ignores
=
True
warn_redundant_casts
=
True
warn_unused_configs
=
True
# The following whitelist is used to allow for incremental adoption
# of Mypy. Modules should be removed from this whitelist as and when
# their respective type errors have been addressed. No new modules
# should be added to this whitelist.
# see https://github.com/python-poetry/poetry/pull/4510.
[mypy-poetry.config.file_config_source]
ignore_errors
=
True
[mypy-poetry.console.*]
ignore_errors
=
True
[mypy-poetry.factory.*]
ignore_errors
=
True
[mypy-poetry.inspection.*]
ignore_errors
=
True
[mypy-poetry.installation.*]
ignore_errors
=
True
[mypy-poetry.layouts.*]
ignore_errors
=
True
[mypy-poetry.mixology.*]
ignore_errors
=
True
[mypy-poetry.packages.locker]
ignore_errors
=
True
[mypy-poetry.puzzle.*]
ignore_errors
=
True
[mypy-poetry.repositories.installed_repository]
ignore_errors
=
True
[mypy-poetry.utils.*]
ignore_errors
=
True
# end of whitelist
pyproject.toml
View file @
f38c3b6e
...
...
@@ -72,38 +72,56 @@ build-backend = "poetry.core.masonry.api"
[tool.isort]
py_version
=
36
profile
=
"black"
force_single_line
=
true
atomic
=
true
include_trailing_comma
=
true
lines_after_imports
=
2
combine_as_imports
=
true
lines_between_types
=
1
use_parentheses
=
true
lines_after_imports
=
2
src_paths
=
[
"poetry"
,
"tests"
]
skip_glob
=
["*/setup.py"]
filter_files
=
true
known_first_party
=
"poetry"
extend_skip
=
["setup.py"]
[tool.black]
line-length
=
88
include
=
'\.pyi?$'
exclude
=
'''
/(
\.eggs
|
\.git
|
\.hg
|
\.mypy_cache
|
\.tox
|
\.venv
|
_build
|
buck-out
|
build
|
dist
|
tests/.*/setup.py
)/
target-version
=
['py36']
force-exclude
=
'''
.*/setup\.py$
'''
[tool.mypy]
python_version
=
"3.6"
check_untyped_defs
=
true
ignore_missing_imports
=
true
warn_redundant_casts
=
true
warn_unused_configs
=
true
warn_unused_ignores
=
true
files
=
"poetry"
# The following whitelist is used to allow for incremental adoption
# of Mypy. Modules should be removed from this whitelist as and when
# their respective type errors have been addressed. No new modules
# should be added to this whitelist.
# see https://github.com/python-poetry/poetry/pull/4510.
[[tool.mypy.overrides]]
module
=
[
'poetry.poetry'
,
'poetry.config.file_config_source'
,
'poetry.console.*'
,
'poetry.factory.*'
,
'poetry.inspection.*'
,
'poetry.installation.*'
,
'poetry.layouts.*'
,
'poetry.mixology.*'
,
'poetry.packages.locker'
,
'poetry.puzzle.*'
,
'poetry.repositories.installed_repository'
,
'poetry.utils.*'
]
ignore_errors
=
true
[tool.coverage.report]
exclude_lines
=
[
"pragma: no cover"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment