prettycsharp 1.1.2__tar.gz → 1.1.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/CHANGELOG.md +5 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/PKG-INFO +1 -1
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/src/prettycsharp/__init__.py +1 -1
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/src/prettycsharp/printer/declarations.py +5 -2
- prettycsharp-1.1.3/tests/fuzz_corpus/csharp/comment_only_accessor_list.cs +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/tests/test_layout.py +20 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/.gitattributes +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/.github/codeql/codeql-config.yml +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/.github/dependabot.yml +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/.github/requirements/build.in +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/.github/requirements/build.txt +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/.github/requirements/fuzz.in +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/.github/requirements/fuzz.txt +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/.github/requirements/pip-audit.in +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/.github/requirements/pip-audit.txt +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/.github/requirements/runtime.in +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/.github/requirements/runtime.txt +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/.github/requirements/test.in +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/.github/requirements/test.txt +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/.github/requirements/zizmor.in +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/.github/requirements/zizmor.txt +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/.github/security/accepted.toml +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/.github/security/clamav/Dockerfile +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/.github/security/malware-accepted.toml +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/.github/security/semgrep/Dockerfile +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/.github/security/yara.json +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/.github/security/yara_update.py +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/.github/workflows/auto-merge.yml +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/.github/workflows/ci.yml +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/.github/workflows/fuzz.yml +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/.github/workflows/malware-scan.yml +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/.github/workflows/publish.yml +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/.github/workflows/scorecard.yml +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/.github/workflows/security.yml +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/.github/workflows/update-yara-rules.yml +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/.github/zizmor.yml +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/.gitignore +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/AGENTS.md +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/CLAUDE.md +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/DESIGN.md +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/LICENSE +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/README.md +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/SECURITY.md +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/fuzz/fuzz_formatter.py +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/pyproject.toml +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/scripts/security/malware_report.py +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/scripts/security/security_report.py +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/src/prettycsharp/__main__.py +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/src/prettycsharp/cli.py +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/src/prettycsharp/conditional.py +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/src/prettycsharp/config.py +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/src/prettycsharp/doc.py +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/src/prettycsharp/formatter.py +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/src/prettycsharp/ignore.py +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/src/prettycsharp/isolate.py +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/src/prettycsharp/parsing.py +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/src/prettycsharp/printer/__init__.py +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/src/prettycsharp/printer/core.py +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/src/prettycsharp/printer/expressions.py +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/src/prettycsharp/printer/statements.py +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/src/prettycsharp/project.py +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/src/prettycsharp/py.typed +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/src/prettycsharp/rewrites.py +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/src/prettycsharp/settings.py +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/src/prettycsharp/syntax.py +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/src/prettycsharp/verify.py +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/tests/fuzz_corpus/csharp/declarations.cs +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/tests/fuzz_corpus/csharp/directives.cs +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/tests/fuzz_corpus/csharp/embedded_statements.cs +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/tests/fuzz_corpus/csharp/expressions.cs +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/tests/fuzz_corpus/csharp/members.cs +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/tests/fuzz_corpus/csharp/order.cs +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/tests/fuzz_corpus/csharp/queries_and_patterns.cs +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/tests/fuzz_corpus/csharp/split_by_conditionals.cs +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/tests/fuzz_corpus/csharp/statements.cs +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/tests/fuzz_corpus/csharp/strings.cs +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/tests/support.py +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/tests/test_cli.py +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/tests/test_conditional.py +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/tests/test_config.py +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/tests/test_doc.py +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/tests/test_docs.py +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/tests/test_format_around.py +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/tests/test_fuzz_corpus.py +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/tests/test_ignore.py +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/tests/test_parsing.py +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/tests/test_project.py +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/tests/test_rewrites.py +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/tests/test_settings.py +0 -0
- {prettycsharp-1.1.2 → prettycsharp-1.1.3}/tests/test_verify.py +0 -0
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Each release's section becomes the body of its GitHub release.
|
|
4
4
|
|
|
5
|
+
## [1.1.3] - 2026-10-17
|
|
6
|
+
|
|
7
|
+
- A property's accessor list or an enum that holds only a comment no longer
|
|
8
|
+
gains a blank line each time the file is formatted. Found by fuzzing.
|
|
9
|
+
|
|
5
10
|
## [1.1.2] - 2026-10-17
|
|
6
11
|
|
|
7
12
|
- Nothing is padded into columns by default any more: `align_assignments`,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: prettycsharp
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.3
|
|
4
4
|
Summary: An opinionated formatter for C#, in the spirit of Prettier
|
|
5
5
|
Project-URL: Homepage, https://github.com/WilliamSmithEdward/prettyCSharp
|
|
6
6
|
Project-URL: Repository, https://github.com/WilliamSmithEdward/prettyCSharp
|
|
@@ -4,7 +4,7 @@ from prettycsharp.formatter import FormatResult, FormattingError, format_details
|
|
|
4
4
|
from prettycsharp.parsing import CSharpSyntaxError
|
|
5
5
|
from prettycsharp.settings import Settings, SettingsError
|
|
6
6
|
|
|
7
|
-
__version__ = "1.1.
|
|
7
|
+
__version__ = "1.1.3"
|
|
8
8
|
|
|
9
9
|
__all__ = [
|
|
10
10
|
"CSharpSyntaxError",
|
|
@@ -399,7 +399,7 @@ class Declarations(Statements):
|
|
|
399
399
|
return [
|
|
400
400
|
self.open_brace("type"),
|
|
401
401
|
self.tok(open_tok),
|
|
402
|
-
indent([HARDLINE, lines]),
|
|
402
|
+
indent([HARDLINE, lines]) if lines else "",
|
|
403
403
|
self.close_comments(close_tok),
|
|
404
404
|
HARDLINE,
|
|
405
405
|
self.tok(close_tok, leading=False),
|
|
@@ -522,10 +522,13 @@ class Declarations(Statements):
|
|
|
522
522
|
return [" ", self.tok(open_tok), " ", join(" ", [self.print(a) for a in accessors]), " ", self.tok(close_tok)]
|
|
523
523
|
if not accessors and not close_tok.leading:
|
|
524
524
|
return [" ", self.tok(open_tok), " ", self.tok(close_tok)]
|
|
525
|
+
body: Doc = ""
|
|
526
|
+
if accessors:
|
|
527
|
+
body = indent([HARDLINE, self.print_list(accessors, lambda a, b: self.has_blank_before(b))])
|
|
525
528
|
return [
|
|
526
529
|
self.open_brace("accessor"),
|
|
527
530
|
self.tok(open_tok),
|
|
528
|
-
|
|
531
|
+
body,
|
|
529
532
|
self.close_comments(close_tok),
|
|
530
533
|
HARDLINE,
|
|
531
534
|
self.tok(close_tok, leading=False),
|
|
@@ -707,6 +707,26 @@ def test_obvious_parentheses_are_removed_and_clarifying_ones_kept() -> None:
|
|
|
707
707
|
)
|
|
708
708
|
|
|
709
709
|
|
|
710
|
+
def test_accessor_list_and_enum_holding_only_a_comment() -> None:
|
|
711
|
+
check(
|
|
712
|
+
"class C { int P {\n// c\n} }\nenum E {\n// c\n}\n",
|
|
713
|
+
"""
|
|
714
|
+
class C
|
|
715
|
+
{
|
|
716
|
+
int P
|
|
717
|
+
{
|
|
718
|
+
// c
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
enum E
|
|
723
|
+
{
|
|
724
|
+
// c
|
|
725
|
+
}
|
|
726
|
+
""",
|
|
727
|
+
)
|
|
728
|
+
|
|
729
|
+
|
|
710
730
|
def test_auto_properties_and_empty_bodies_stay_on_one_line() -> None:
|
|
711
731
|
check(
|
|
712
732
|
"""
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|