Skip to content
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

fix linting error #44

Merged
merged 1 commit into from
Mar 9, 2024
Merged

Conversation

marianoag
Copy link
Contributor

@marianoag marianoag commented Mar 9, 2024

syswow64 = os.path.join(util.protonprefix(), 'drive_c/windows/syswow64', 'dgvoodoo.conf')

in #43 for some protonfixes the name of the file was added to syswow64 and it's fine but in this case syswow64 dir is used with another file so:

shutil.copy(os.path.join(syswow64, 'dgd3d9.dll'),os.path.join(syswow64, 'd3d9.dll'))
is drive_c/windows/syswow64/dgvoodoo.conf/d3d9.dll instead of drive_c/windows/syswow64/d3d9.dll

@R1kaB3rN is this done automatically when the protonfix is linted or was this manual?

If it was manual it was a mistake there's no problem, but if it was automatic there's something wrong and maybe there are more protonfixes affected.

i guess it was manual because it wasn't modified now.

@R1kaB3rN
Copy link
Member

R1kaB3rN commented Mar 9, 2024

syswow64 = os.path.join(util.protonprefix(), 'drive_c/windows/syswow64', 'dgvoodoo.conf')

in #43 for some protonfixes the name of the file was added to syswow64 and it's fine but in this case syswow64 dir is used with another file so:

shutil.copy(os.path.join(syswow64, 'dgd3d9.dll'),os.path.join(syswow64, 'd3d9.dll')) is drive_c/windows/syswow64/dgvoodoo.conf/d3d9.dll instead of drive_c/windows/syswow64/d3d9.dll

@R1kaB3rN is this done automatically when the protonfix is linted or was this manual?

If it was manual it was a mistake there's no problem, but if it was automatic there's something wrong and maybe there are more protonfixes affected.

i guess it was manual because it wasn't modified now.

Thanks for reporting this. Yes, rest assured, this was manually edited and the linter will not automatically apply fixes. The reason for this particular change was to satisfy Pylint's f-string rule (C0209), which the first argument for the subprocess statement had violated.

This was actually one of the few cases that were, comparatively, non-trivial as for the rest I was mainly deleting trailing new lines or deleting/moving module statements. Other fixes that are similar to this include gamefixes-steam/302370.py which does not include a copy statement.

@R1kaB3rN R1kaB3rN merged commit 568fe1f into Open-Wine-Components:master Mar 9, 2024
1 check passed
@marianoag
Copy link
Contributor Author

Other fixes that are similar to this include gamefixes-steam/302370.py which does not include a copy statement.

And another one is 497360 (syswow64 also not used somewhere else) but you put /dgvoodoo.conf in the f-string instead of syswow64. the declaration was some lines above. When i cleaned the mess left after trial and error with protonfixes like these, somehow syswow was left outside the if, far from the sed call.

This was good for me, i learnt something new, didn't know about f-string.

@marianoag marianoag deleted the BigSecret branch April 4, 2024 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants