@@ -7,7 +7,6 @@ requires-python = ">=3.9"
77license = { text = " MIT License" }
88authors = [{
name =
" Sébastien Eustace" ,
email =
" [email protected] " }]
99keywords = [' datetime' , ' date' , ' time' ]
10-
1110classifiers = [
1211 " License :: OSI Approved :: MIT License" ,
1312 " Programming Language :: Python :: 3" ,
@@ -20,6 +19,10 @@ classifiers = [
2019dependencies = [
2120 " python-dateutil>=2.6" ,
2221 " tzdata>=2020.1" ,
22+ ]
23+
24+ [project .optional-dependencies ]
25+ test = [
2326 ' time-machine>=2.6.0; implementation_name != "pypy"' ,
2427]
2528
@@ -29,25 +32,6 @@ Documentation = "https://pendulum.eustace.io/docs"
2932Repository = " https://github.com/sdispater/pendulum"
3033
3134
32- [tool .poetry ]
33- name = " pendulum"
34- version = " 3.0.0"
35- description = " Python datetimes made easy"
36- authors = [
" Sébastien Eustace <[email protected] >" ]
37- license = " MIT"
38- readme = ' README.rst'
39- homepage = " https://pendulum.eustace.io"
40- repository = " https://github.com/sdispater/pendulum"
41- documentation = " https://pendulum.eustace.io/docs"
42- keywords = [' datetime' , ' date' , ' time' ]
43-
44-
45- [tool .poetry .dependencies ]
46- python = " >=3.9"
47- python-dateutil = " >=2.6"
48- time-machine = { version = " >=2.16.0" , markers = " implementation_name != 'pypy'" , optional = true }
49- tzdata = " >=2020.1"
50-
5135[tool .poetry .group .test .dependencies ]
5236pytest = " ^7.1.2"
5337pytz = " >=2022.1"
@@ -79,53 +63,55 @@ pytest-codspeed = "^3.0.0"
7963[tool .poetry .group .build .dependencies ]
8064maturin = " >=1.0,<2.0"
8165
82- [tool .poetry .extras ]
83- test = [" time-machine" ]
84-
8566[tool .maturin ]
8667module-name = " pendulum._pendulum"
8768
88-
8969[tool .ruff ]
9070fix = true
91- unfixable = [
92- " ERA" , # do not autoremove commented out code
93- ]
94- target-version = " py39"
9571line-length = 88
72+ target-version = " py39"
73+ extend-exclude = [
74+ # External to the project's coding standards:
75+ " docs/*" ,
76+ # Machine-generated, too many false-positives
77+ " src/pendulum/locales/*" ,
78+ # ruff disagrees with black when it comes to formatting
79+ " *.pyi" ,
80+ ]
81+
82+ [tool .ruff .lint ]
9683extend-select = [
97- " B" , # flake8-bugbear
98- " C4" , # flake8-comprehensions
84+ " B" , # flake8-bugbear
85+ " C4" , # flake8-comprehensions
9986 " ERA" , # flake8-eradicate/eradicate
100- " I" , # isort
101- " N" , # pep8-naming
87+ " I" , # isort
88+ " N" , # pep8-naming
10289 " PIE" , # flake8-pie
10390 " PGH" , # pygrep
10491 " RUF" , # ruff checks
10592 " SIM" , # flake8-simplify
93+ " T20" , # flake8-print
10694 " TCH" , # flake8-type-checking
10795 " TID" , # flake8-tidy-imports
108- " UP" , # pyupgrade
96+ " UP" , # pyupgrade
10997]
11098ignore = [
11199 " B904" , # use 'raise ... from err'
112100 " B905" , # use explicit 'strict=' parameter with 'zip()'
113- " N818" , # Exception name should be named with an Error suffix
114- " RUF001" ,
101+ " N818" ,
102+ " RUF001"
115103]
116- extend-exclude = [
117- # External to the project's coding standards:
118- " docs/*" ,
119- # Machine-generated, too many false-positives
120- " src/pendulum/locales/*" ,
121- # ruff disagrees with black when it comes to formatting
122- " *.pyi" ,
104+ extend-safe-fixes = [
105+ " TCH" , # move import from and to TYPE_CHECKING blocks
106+ ]
107+ unfixable = [
108+ " ERA" , # do not autoremove commented out code
123109]
124110
125- [tool .ruff .flake8-tidy-imports ]
111+ [tool .ruff .lint . flake8-tidy-imports ]
126112ban-relative-imports = " all"
127113
128- [tool .ruff .isort ]
114+ [tool .ruff .lint . isort ]
129115force-single-line = true
130116lines-between-types = 1
131117lines-after-imports = 2
@@ -139,7 +125,7 @@ known-third-party = [
139125]
140126required-imports = [" from __future__ import annotations" ]
141127
142- [tool .ruff .extend-per-file-ignores ]
128+ [tool .ruff .lint . extend-per-file-ignores ]
143129"build.py" = [" I002" ]
144130"clock" = [" RUF012" ]
145131
0 commit comments