Skip to content

Commit ead45c4

Browse files
committed
lint
1 parent 9987042 commit ead45c4

31 files changed

Lines changed: 1065 additions & 600 deletions

.idea/misc.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/workspace.xml

Lines changed: 117 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.pre-commit-config.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
repos:
2+
- repo: https://github.com/psf/black
3+
rev: 24.3.0
4+
hooks:
5+
- id: black
6+
7+
- repo: https://github.com/astral-sh/ruff-pre-commit
8+
rev: v0.4.4
9+
hooks:
10+
- id: ruff
11+
args: [--fix]

Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,17 @@ test:
1515
test-with-xdist:
1616
docker run --rm pytest-html-plus poetry run pytest tests/unit --reruns 1 -n auto
1717

18+
install-formatter:
19+
pip install pre-commit
20+
pre-commit install
21+
1822
lint:
1923
docker run --rm pytest-html-plus poetry run ruff check .
2024

2125
fix:
2226
docker run --rm pytest-html-plus poetry run ruff check . --fix
2327
docker run --rm pytest-html-plus poetry run ruff format .
2428

25-
format:
26-
docker run --rm -v $(PWD):/app -w /app pytest-html-plus isort .
27-
docker run --rm -v $(PWD):/app -w /app pytest-html-plus black .
2829

2930
clean:
3031
docker rmi pytest-html-plus

docs/conf.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,23 @@
33
import os
44
import sys
55

6-
sys.path.insert(0, os.path.abspath('..'))
6+
sys.path.insert(0, os.path.abspath(".."))
77

8-
project = 'pytest-html-plus'
9-
copyright = '2025, ReporterPlus'
10-
author = 'ReporterPlus'
11-
release = '0.5.0'
8+
project = "pytest-html-plus"
9+
copyright = "2025, ReporterPlus"
10+
author = "ReporterPlus"
11+
release = "0.5.0"
1212

1313
extensions = [
14-
'sphinx.ext.autodoc',
15-
'sphinx.ext.napoleon',
16-
'sphinx.ext.viewcode',
17-
'myst_parser',
14+
"sphinx.ext.autodoc",
15+
"sphinx.ext.napoleon",
16+
"sphinx.ext.viewcode",
17+
"myst_parser",
1818
]
1919

20-
templates_path = ['_templates']
20+
templates_path = ["_templates"]
2121
exclude_patterns = []
2222

2323

24-
html_theme = 'furo'
25-
html_static_path = ['_static']
24+
html_theme = "furo"
25+
html_static_path = ["_static"]

main.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
1-
# This is a sample Python script.
2-
3-
# Press ⌃R to execute it or replace it with your code.
4-
# Press Double ⇧ to search everywhere for classes, files, tool windows, actions, and settings.
5-
6-
71
def print_hi(name):
82
# Use a breakpoint in the code line below to debug your script.
9-
print(f'Hi, {name}') # Press ⌘F8 to toggle the breakpoint.
3+
print(f"Hi, {name}") # Press ⌘F8 to toggle the breakpoint.
104

115

126
# Press the green button in the gutter to run the script.
13-
if __name__ == '__main__':
14-
print_hi('PyCharm')
7+
if __name__ == "__main__":
8+
print_hi("PyCharm")
159

1610
# See PyCharm help at https://www.jetbrains.com/help/pycharm/

0 commit comments

Comments
 (0)