-
Notifications
You must be signed in to change notification settings - Fork 811
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Demonstration of old python code using pyupgrade #2100
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +0,0 @@ | ||
|
||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# -*- coding: latin-1 -*- | ||
|
||
# PyWin32 Internet Explorer Button | ||
# | ||
# written by Leonard Ritter (paniq@gmx.net) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# -*- coding: latin-1 -*- | ||
|
||
# PyWin32 Internet Explorer Toolbar | ||
# | ||
# written by Leonard Ritter (paniq@gmx.net) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
""" | ||
Implements a permissions editor for services. | ||
Service can be specified as plain name for local machine, | ||
or as a remote service of the form \\machinename\service | ||
or as a remote service of the form \\machinename\\service | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm quite surprised this tool is so opinionated about comments, but it got it wrong here - the existing "\\" should now be "\\\\" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think it's an opinion about comments: it correctly found (and fixed) an invalid escape sequence in the dosctring: That being said, you're right this docstring should have |
||
""" | ||
|
||
import os | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
@echo off | ||
@REM Ignore adodbapi until this has been manually ran and merged in adodbapi code | ||
@REM _dbgscript.py is non-UTF8 on purpose, which is not supported | ||
for /f "delims=" %%F in ('git ls-files **.py* :!:adodbapi/* :!:Pythonwin/pywin/test/_dbgscript.py') do ( | ||
@REM TODO: Remove the --keep-percent-format flag and fix all printf-style string formatting | ||
pyupgrade --keep-percent-format --py37-plus %%F | ||
) | ||
@echo on | ||
pycln . --config=pycln.toml | ||
isort . | ||
black . |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# -*- coding: UTF-8 -*- | ||
|
||
""" | ||
win32timezone: | ||
Module for handling datetime.tzinfo time zones using the windows | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know Scintilla is vendored, but these changes are automated. Just like
pycln
,isort
andblack
, is that fine? I assume the idea is that we trust this won't lead to behaviour changes and that updating Scintilla won't cause these changes to be lost because they'll be automatically re-applied.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem then will be that re-vendoring in the future would break, meaning we'd need to work out what to re-run etc. It seems better long term to just ignore scintilla entirely, which works both today and in the future.