1
- [tool . poetry ]
1
+ [project ]
2
2
name = " dropstackframe"
3
+ requires-python = " <4,>=3.10"
3
4
version = " 0.1.0"
4
5
description = " A python package for removing stack frames from stack traces."
5
- authors = [
" Jesper Nielsen <[email protected] >" ]
6
+ authors = [
7
+ {
name =
" Jesper Nielsen" ,
email =
" [email protected] " }
8
+ ]
6
9
license = " MIT"
7
10
readme = " README.md"
8
-
9
11
homepage = " https://github.com/jesnie/dropstackframe"
10
12
repository = " https://github.com/jesnie/dropstackframe"
11
13
@@ -20,89 +22,110 @@ classifiers = [
20
22
" Programming Language :: Python :: 3.13" ,
21
23
]
22
24
23
- [tool .poetry .dependencies ]
24
- python = " <4,>=3.10"
25
-
26
-
27
- [tool .poetry .group .dev .dependencies ]
28
- black = " <25.2,>=25.1"
29
- compreq = " <0.3.2,>=0.3.1"
30
- isort = " <6.1,>=6.0"
31
- mypy = " <1.16,>=1.15"
32
- pylint = " <3.4,>=3.3"
33
- pytest = " <8.4,>=8.3"
34
- taskipy = " <1.15,>=1.14"
35
- tomlkit = " <0.13.3,>=0.13.2"
25
+ [dependency-groups ]
26
+ dev = [
27
+ " compreq<0.3.4,>=0.3.3" ,
28
+ " mypy<1.18,>=1.17" ,
29
+ " pytest<8.5,>=8.4" ,
30
+ " ruff<0.12.6,>=0.12.5" ,
31
+ " taskipy<1.15,>=1.14" ,
32
+ " tomlkit<0.13.4,>=0.13.3" ,
33
+ ]
36
34
37
35
[build-system ]
38
- requires = [" poetry-core " ]
39
- build-backend = " poetry.core.masonry.api "
36
+ requires = [" hatchling " ]
37
+ build-backend = " hatchling.build "
40
38
39
+ [tool .ruff ]
40
+ line-length = 100
41
+ indent-width = 4
41
42
42
- [tool .isort ]
43
- py_version = 310
44
- profile = " black"
43
+ [tool .ruff .lint ]
44
+ select = [" ALL" ]
45
+ ignore = [
46
+ " ANN401" , # Dynamically typed expressions (typing.Any) are disallowed
47
+ " ARG" , # Unused arguments...
48
+ " ARG002" , # Unused method argument: `context`
49
+ " C901" , # `get_lazy_release_set` is too complex
50
+ " COM812" , # Not recommended with formatting
51
+ " D" , # DocStrings
52
+ " E501" , # Line too long
53
+ " EM101" , # Exception must not use a string literal, assign to variable first
54
+ " EM102" , # Exception must not use an f-string literal, assign to variable first
55
+ " FBT" , # Boolean value in call
56
+ " PLR0912" , # Too many branches
57
+ " PLR0913" , # Too many arguments in function definition (7 > 5)
58
+ " PLR0915" , # Too many statements (62 > 50)
59
+ " PLR2004" , # Magic value used in comparison, consider replacing `2` with a constant variable
60
+ " PLW0603" , # Using the global statement to update `_enabled` is discouraged
61
+ " PLW2901" , # `for` loop variable `name` overwritten by assignment target
62
+ " PT006" , # Wrong type passed to first argument of `pytest.mark.parametrize`; expected `tuple`
63
+ " PT011" , # `pytest.raises(ValueError)` is too broad, set the `match` parameter or use a more specific exception
64
+ " PT013" , # Incorrect import of `pytest`; use `import pytest` instead
65
+ " PT018" , # Assertion should be broken down into multiple parts
66
+ " PTH123" , # `open()` should be replaced by `Path.open()`
67
+ " PYI025" , # Use `from collections.abc import Set as AbstractSet` to avoid confusion with the `set` builtin
68
+ " RET505" , # Unnecessary `else` after `return` statement
69
+ " S101" , # Use of `assert` detected
70
+ " S610" , # Use of Django `extra` can lead to SQL injection vulnerabilities
71
+ " SIM114" , # Combine `if` branches using logical `or` operator
72
+ " SLF001" , # Private member accessed: `_path`
73
+ " T201" , # `print` found
74
+ " TC001" , # Move application import `compreq.contexts.DistributionContext` into a type-checking block
75
+ " TC002" , # Move third-party import `packaging.version.Version` into a type-checking block
76
+ " TC003" , # Move standard library import `collections.abc.Iterator` into a type-checking block
77
+ " TRY003" , # Avoid specifying long messages outside the exception class
78
+ " TRY301" , # Abstract `raise` to an inner functio
79
+ " UP015" , # Unnecessary modes
80
+ ]
45
81
46
- [tool .black ]
47
- target-version = [" py310" ]
48
- line-length = 100
82
+ [tool .ruff .lint .per-file-ignores ]
83
+ "tests/**/*.py" = [
84
+ " DTZ001" , # `datetime.datetime()` called without a `tzinfo` argument
85
+ ]
49
86
50
87
[tool .mypy ]
51
88
python_version = " 3.10"
52
89
show_error_codes = true
90
+ # First we turn on *all the checks*, and then we turn off those that are too annoying.
53
91
strict = true
92
+ disallow_untyped_decorators = false
54
93
55
94
[[tool .mypy .overrides ]]
56
95
module = [
57
96
" _testcapi.*" ,
58
97
]
59
98
ignore_missing_imports = true
60
99
61
- [tool .pylint .messages_control ]
62
- max-line-length = 100
63
- disable = [
64
- " c-extension-no-member" ,
65
- " global-statement" ,
66
- " invalid-name" ,
67
- " missing-function-docstring" ,
68
- " missing-module-docstring" ,
69
- " no-member" ,
70
- ]
71
-
72
-
73
100
[tool .taskipy .tasks ]
74
- isort = """
75
- echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX isort XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
76
- isort dropstackframe tests set_version.py requirements.py
101
+ ruff_fmt = """
102
+ echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ruff format XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
103
+ ruff format dropstackframe tests set_version.py requirements.py
77
104
"""
78
- isort_check = """
79
- echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX isort XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
80
- isort --check-only dropstackframe tests set_version.py requirements.py
105
+ ruff_fmt_check = """
106
+ echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ruff format XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
107
+ ruff format --check dropstackframe tests set_version.py requirements.py
81
108
"""
82
- black = """
83
- echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX black XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
84
- black dropstackframe tests set_version.py requirements.py
109
+ ruff_lint = """
110
+ echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ruff lint XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
111
+ ruff check --fix-only dropstackframe tests set_version.py requirements.py
85
112
"""
86
- black_check = """
87
- echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX black XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
88
- black -- check dropstackframe tests set_version.py requirements.py
113
+ ruff_lint_check = """
114
+ echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ruff lint XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
115
+ ruff check dropstackframe tests set_version.py requirements.py
89
116
"""
90
117
mypy = """
91
118
echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX mypy XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
92
119
mypy dropstackframe tests set_version.py requirements.py
93
120
"""
94
- pylint = """
95
- echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX pylint XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
96
- pylint dropstackframe tests set_version.py requirements.py
97
- """
98
121
pytest = """
99
122
echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX pytest XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
100
123
pytest tests
101
124
"""
102
125
103
- format = " task isort && task black "
104
- format_check = " task isort_check && task black_check "
105
- lint = " task format_check && task mypy && task pylint "
126
+ format = " task ruff_fmt && task ruff_lint "
127
+ format_check = " task ruff_fmt_check "
128
+ lint = " task format_check && task mypy && task ruff_lint_check "
106
129
test = " task lint && task pytest"
107
130
format_and_lint = " task format && task lint"
108
131
format_and_test = " task format && task test"
0 commit comments