File tree Expand file tree Collapse file tree 4 files changed +46
-36
lines changed Expand file tree Collapse file tree 4 files changed +46
-36
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
repos :
2
- - repo : https://github.com/asottile/pyupgrade
3
- rev : v3.15.0
4
- hooks :
5
- - id : pyupgrade
6
- args : [--py38-plus]
7
-
8
- - repo : https://github.com/psf/black-pre-commit-mirror
9
- rev : 23.12.1
10
- hooks :
11
- - id : black
12
- args : [--skip-string-normalization]
13
-
14
- - repo : https://github.com/PyCQA/isort
15
- rev : 5.13.2
16
- hooks :
17
- - id : isort
18
- args : [--profile=black]
19
-
20
- - repo : https://github.com/PyCQA/flake8
21
- rev : 6.1.0
22
- hooks :
23
- - id : flake8
24
- additional_dependencies :
25
- [flake8-2020, flake8-implicit-str-concat]
26
-
27
- - repo : https://github.com/pre-commit/pygrep-hooks
28
- rev : v1.10.0
29
- hooks :
30
- - id : python-check-blanket-noqa
2
+ - repo : https://github.com/astral-sh/ruff-pre-commit
3
+ rev : v0.5.7
4
+ hooks :
5
+ - id : ruff
6
+ name : Run Ruff (lint)
7
+ args : [--exit-non-zero-on-fix]
8
+ - id : ruff-format
9
+ name : Run Ruff (format)
10
+ args : [--check]
31
11
32
12
- repo : https://github.com/pre-commit/pre-commit-hooks
33
13
rev : v4.5.0
Original file line number Diff line number Diff line change
1
+ target-version = " py311"
2
+ fix = true
3
+ output-format = " full"
4
+ line-length = 88
5
+
6
+ [lint ]
7
+ preview = true
8
+ select = [
9
+ " C4" , # flake8-comprehensions
10
+ " B" , # flake8-bugbear
11
+ " E" , # pycodestyle
12
+ " F" , # pyflakes
13
+ " FA" , # flake8-future-annotations
14
+ " FLY" , # flynt
15
+ " FURB" , # refurb
16
+ " G" , # flake8-logging-format
17
+ " I" , # isort
18
+ " ISC" , # flake8-implicit-str-concat
19
+ " LOG" , # flake8-logging
20
+ " PERF" , # perflint
21
+ " PGH" , # pygrep-hooks
22
+ " PT" , # flake8-pytest-style
23
+ " TCH" , # flake8-type-checking
24
+ " UP" , # pyupgrade
25
+ " W" , # pycodestyle
26
+ " YTT" , # flake8-2020
27
+ ]
28
+ ignore = [
29
+ " E501" , # Ignore line length errors (we use auto-formatting)
30
+ ]
31
+
32
+ [format ]
33
+ preview = true
34
+ quote-style = " preserve"
35
+ docstring-code-format = true
Original file line number Diff line number Diff line change 1
1
"""Read in a JSON and generate two CSVs and an SVG file."""
2
+
2
3
from __future__ import annotations
3
4
4
5
import argparse
5
6
import csv
6
7
import datetime as dt
7
8
import json
8
- import sys
9
9
10
10
import jinja2
11
11
@@ -45,10 +45,7 @@ def __init__(self) -> None:
45
45
46
46
def write_csv (self ) -> None :
47
47
"""Output CSV files."""
48
- if sys .version_info >= (3 , 11 ):
49
- now_str = str (dt .datetime .now (dt .UTC ))
50
- else :
51
- now_str = str (dt .datetime .utcnow ())
48
+ now_str = str (dt .datetime .now (dt .UTC ))
52
49
53
50
versions_by_category = {"branches" : {}, "end-of-life" : {}}
54
51
headers = None
You can’t perform that action at this time.
0 commit comments