Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-103997: Automatically dedent the argument to "-c"#103998

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
methane merged 49 commits intopython:mainfromErotemic:dedent_pymain_command
Apr 18, 2025
Merged
Changes from1 commit
Commits
Show all changes
49 commits
Select commitHold shift + click to select a range
16be08f
Very rough proof-of-concept
ErotemicApr 29, 2023
e88216b
Cleanups and comments
ErotemicApr 29, 2023
bcb7c77
Fix bad decref, only trigger if command starts with a newline
ErotemicApr 29, 2023
fb8985a
wchar dedent
ErotemicApr 30, 2023
26f27a8
tweaks
ErotemicApr 30, 2023
417eff8
Use new char* implementation
ErotemicApr 30, 2023
924e0a6
Rename function
ErotemicApr 30, 2023
9f95672
tweaks
ErotemicApr 30, 2023
3f4a78b
More tweaks
ErotemicMay 1, 2023
97f2079
Replace strncmp with direct char comparison
ErotemicMay 1, 2023
04435eb
Remove debug code
ErotemicMay 1, 2023
4c4eca9
Made new function static
ErotemicMay 1, 2023
f9c969b
Handwritten char iter and _PyBytesWriter_
ErotemicMay 1, 2023
674f1e0
reimplement it to imitate `textwrap.dedent`
sunmy2019May 1, 2023
05d4169
fix missing initialization
sunmy2019May 1, 2023
9d53c4e
fix ref leak
sunmy2019May 1, 2023
689a13a
fix empty string
sunmy2019May 1, 2023
f0ac7ea
nit: remove unnecessary variable
sunmy2019May 1, 2023
71cad01
remove unnecessary include
sunmy2019May 1, 2023
4549de8
Add test cases
ErotemicMay 1, 2023
0c3b90b
Fix test on windows
ErotemicMay 1, 2023
1f5b746
normalize windows line endings
ErotemicMay 1, 2023
ca40589
Merge branch 'main' into dedent_pymain_command
ErotemicMay 1, 2023
1f17e23
Update Modules/main.c
sunmy2019May 3, 2023
2de2e1e
Merge branch 'python:main' into dedent_pymain_command
sunmy2019Jul 23, 2023
c84616c
refactor code
sunmy2019Jul 23, 2023
a19b675
Apply suggestions from code review
sunmy2019Jul 23, 2023
7ce411f
Update Misc/NEWS.d/next/Core and Builtins/2023-04-29-23-15-38.gh-issu…
sunmy2019Jul 23, 2023
dea4301
resolve comments
sunmy2019Jul 23, 2023
e06d40c
Update Modules/main.c
sunmy2019Jul 23, 2023
a40d028
rename `out` to `dest`
sunmy2019Jul 23, 2023
9569655
move to _PyUnicode_Dedent
sunmy2019Jul 24, 2023
1735d0f
Apply suggestions from code review
sunmy2019Jul 24, 2023
d3681b7
clean up things
sunmy2019Jul 25, 2023
3b4a7bc
Merge branch 'main' into dedent_pymain_command
ErotemicApr 2, 2024
f355760
Merge branch 'main' into dedent_pymain_command
ErotemicApr 19, 2024
b1e89c9
Merge branch 'main' into dedent_pymain_command
AA-TurnerApr 9, 2025
d1b4cd1
Update Misc/NEWS.d/next/Core and Builtins/2023-04-29-23-15-38.gh-issu…
ErotemicApr 10, 2025
e556bbf
lint: space in folder name
ErotemicApr 10, 2025
136c8b0
Explicit include of pycore_unicodeobject.h
ErotemicApr 10, 2025
8e5cc7f
Merge branch 'main' into dedent_pymain_command
ErotemicApr 10, 2025
cd14a00
Apply suggestions from code review
sunmy2019Apr 17, 2025
07d2273
Resolve Comments
sunmy2019Apr 17, 2025
ed6e17b
Refactor implementation
sunmy2019Apr 18, 2025
d1edb1b
Merge branch 'main' into dedent_pymain_command
sunmy2019Apr 18, 2025
4c78c57
Apply suggestions from code review
methaneApr 18, 2025
38d2a4e
add what's new entry
methaneApr 18, 2025
42b6330
Document dedentation of command in version 3.14
methaneApr 18, 2025
98c17e5
Apply suggestions from code review
picnixzApr 18, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
Document dedentation of command in version 3.14
  • Loading branch information
@methane
methane committedApr 18, 2025
commit42b633095a2d9290eb7415243ce4d0aa1772f398
3 changes: 3 additions & 0 deletionsDoc/using/cmdline.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -73,6 +73,9 @@ source.

.. audit-event:: cpython.run_command command cmdoption-c

.. versionchanged:: 3.14
*command* is automatically dedented before execution.

.. option:: -m <module-name>

Search :data:`sys.path` for the named module and execute its contents as
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp