You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This includes updating the type hints to the Python 3.10 format. We can
use the new format and still maintain compatibility with Python 3.8 by
using a `__future__` import.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,9 @@
2
2
3
3
Compatible with GDMC-HTTP **>=1.6.0, <2.0.0** and Minecraft **1.21.4**.
4
4
5
+
**Fixes:**
6
+
- The re-exports in the `gdpc` top-level package are now formatted in a more standard way, which may prevent issues with static analysis tools when importing them.
Copy file name to clipboardExpand all lines: pyproject.toml
+67-2Lines changed: 67 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -14,12 +14,77 @@ exclude = [
14
14
"**/__pycache__",
15
15
"**/site-packages/nbt/**",
16
16
]
17
-
stubPath = "src/stubs"
18
-
typeCheckingMode = "strict"
19
17
ignore = [
20
18
"**/site-packages/nbt/**",
21
19
]
20
+
stubPath = "src/stubs"
21
+
typeCheckingMode = "strict"
22
+
reportUnusedImport = "warning"
22
23
23
24
24
25
[tool.mypy]
25
26
mypy_path = "src/stubs"
27
+
28
+
29
+
[tool.ruff]
30
+
target-version = "py38"# If we move the project setup from setup.py to pyproject.toml, replace this with project.requires-python. https://docs.astral.sh/ruff/settings/#target-version
31
+
line-length = 100
32
+
33
+
[tool.ruff.lint]
34
+
select = ["ALL"]
35
+
ignore = [
36
+
# Reason for ignoring:
37
+
# DI: Disagree - I disagree with this rule in nearly all cases.
38
+
# AL: Alternative - The rule is incompatible with an alternative rule.
39
+
# TB: Too broad - The rule is sometimes useful, but gives too many false positives.
40
+
# PA: Public API - The fix may require changing a public API, making this rule unusable in many cases.
41
+
# HI: Hint - The rule would be useful at hint-severity, if ruff supported that.
42
+
# PR: Project-specific - There is a project-specific reason to not use this rule.
43
+
44
+
# Mainly DI
45
+
"RUF010", # explicit-f-string-type-conversion - DI - Explicit conversion is more readable. See also https://peps.python.org/pep-0498/#s-r-and-a-are-redundant
46
+
47
+
# Mainly AL
48
+
"D203", # incorrect-blank-line-before-class - AL - Disabled in favor of D211.
49
+
"D213", # multi-line-summary-second-line - AL - Disabled in favor of D212.
50
+
51
+
# Mainly TB
52
+
"ANN401", # any-type - TB - Any can be useful for very generic interfaces or as an acceptable temporary solution.
53
+
"C90", # mccabe - TB - May be hard to fix, and real issues can be spotted manually.
54
+
"D105", # undocumented-magic-method - TB - Many magic methods are self-explanatory.
55
+
"D202", # blank-line-after-function - TB - Adding a blank line can improve readability when the docstring is short.
56
+
"D204", # incorrect-blank-line-after-class - TB - The blank line can be unnecessary for very short classes.
57
+
"D205", # missing-blank-line-after-summary - TB - A single line is sometimes too limiting, and most tools can handle multiple lines.
58
+
"D209", # new-line-after-last-paragraph - TB - It's a bit nasty, but breaking this rule can help compactify short docstrings.
59
+
"D301", # escape-sequence-in-docstring - TB - It's a bit nasty, but breaking this rule with "\n" can help compactify short docstrings.
60
+
"D400", # missing-trailing-period - TB - Other punctuation is also acceptable. We use D415 instead.
61
+
"D401", # non-imperative-mood - TB - This is very controversial. I personally prefer the descriptive mood in most cases.
62
+
"D404", # docstring-starts-with-this - TB - There are valid usages of "this", such as when referring to a method's object.
63
+
"E501", # line-too-long - TB - Lines occasionally need to be longer, such as when a comment contains a long link.
64
+
"E701", # multiple-statements - TB - Single-line if-statements can be more readable in certain scenarios.
65
+
"E741", # ambiguous-variable-name - TB - "l" is often fine, and the others may occasionally be fine as well.
66
+
"FBT001", # boolean-type-hint-positional-argument - TB, PA, and mostly redundant with FBT003.
67
+
"FBT002", # boolean-default-value-positional-argument - TB, PA, and mostly redundant with FBT003.
68
+
"ISC003", # explicit-string-concatenation - TB - In cases where some lines are literals and some expressions, it is clearer to use + everywhere.
69
+
"PERF203", # try-except-in-loop - TB - The try-except can often not be taken out of the loop.
70
+
"PLR091", # too-many-* - TB, PA - Real issues can be spotted manually.
71
+
"PLR2004", # magic-value-comparison - TB - Although this rule is often right, there are also many cases where a constant is overkill.
72
+
"PLW2901", # redefined-loop-name - TB - Reuse of the loop variable can help keep names simple. This rule does have a strong case, though.
73
+
"PTH", # flake8-use-pathlib - TB, HI - Old-style path manipulation is acceptable, and occasionally even more readable.
74
+
"S311", # suspicious-non-cryptographic-random-usage - TB - Not all random usages are cryptographic.
75
+
76
+
# Mainly HI
77
+
"FIX", # flake8-fixme - HI
78
+
"TD", # flake8-todos - HI
79
+
80
+
# Mainly PR
81
+
"N802", # invalid-function-name - PR, PA - For historical reasons, GDPC uses camelCase.
82
+
"N803", # invalid-argument-name - PR, PA - for historical reasons, GDPC uses camelCase.
Copy file name to clipboardExpand all lines: release-guide.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ Steps to make a release:
8
8
- In `__init__.py`, update `__version__` to the new version number.
9
9
- Change the "In development" header in the changelog to the new version number, and add a new "In development" section with only the compatibility line.
10
10
- If necessary, update the compatible GDMC-HTTP and Minecraft versions listed on the installation page of the docs and in the changelog.
11
-
- If necessary, update the minimum Python version listed on the installation page of the docs.
11
+
- If necessary, update the minimum Python version listed in setup.py, pyproject.toml, and on the installation page of the docs.
12
12
- Commit the changes above with the title "Updated version to X.X.X".
13
13
- Push changes to GitHub (things will be public from here).
0 commit comments