Skip to content

Commit

Permalink
chore: Run pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
TheEvilSkeleton committed Dec 11, 2024
1 parent 0728191 commit 1dd9237
Show file tree
Hide file tree
Showing 66 changed files with 491 additions and 427 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ body:
value: |
⚠️ Do not open issues for Windows executables not working in Bottles, if not installed through our installers. Bottles is a Wine prefix manager. If a Windows application doesn't work, it could be a Wine problem or a misconfiguration of the Wine prefix. Please visit [WineHQ](https://www.winehq.org) and [ProtonDB](https://www.protondb.com) for more information on the software you are trying to run. For additional support, use the [Programs](https://github.com/bottlesdevs/programs) repository.
⚠️ Do not open issues for bugs outside of [Bottles on Flathub](https://flathub.org/apps/details/com.usebottles.bottles), as we do not support packages from third-party repositories. If you can reproduce the bug(s) using Bottles on Flathub, then we will provide support, otherwise we will close the issue.
- type: textarea
id: what-happened
attributes:
Expand Down
4 changes: 2 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Description
Please include a summary of the change and which issue is fixed (if available).
Please include a summary of the change and which issue is fixed (if available).
Please also include relevant motivation and context.

Fixes #(issue)
Expand All @@ -11,7 +11,7 @@ Fixes #(issue)
- [ ] This change requires a documentation update

# How Has This Been Tested?
Please describe the tests that you ran to verify your changes.
Please describe the tests that you ran to verify your changes.
Provide instructions so we can reproduce.
- [ ] Test A
- [ ] Test B
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
"request": "attach"
}
]
}
}
2 changes: 1 addition & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@
"type": "shell"
}
]
}
}
1 change: 0 additions & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,3 @@ Additional language was incorporated and modified from the following Codes of Co
* [Mozilla Community Participation Guidelines](https://www.mozilla.org/en-US/about/governance/policies/participation/) is licensed [Creative Commons Attribution-ShareAlike 3.0 Unported License](https://creativecommons.org/licenses/by-sa/3.0/).
* [Python Mentors Code of Conduct](http://pythonmentors.com/)
* [Speak Up! Community Code of Conduct](http://web.archive.org/web/20141109123859/http://speakup.io/coc.html), licensed under a [Creative Commons Attribution 3.0 Unported License](http://creativecommons.org/licenses/by/3.0/)

6 changes: 3 additions & 3 deletions CODING_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ python ./utils/flatpak-pip-generator.py --runtime org.gnome.Sdk -r requirements.

### `po/POTFILES`

List of source files containing translatable strings.
List of source files containing translatable strings.
Regenerate this file when you added/moved/removed/renamed files
that contains translatable strings.

Expand All @@ -59,8 +59,8 @@ EOF

### `po/bottles.pot` and `po/*.po`

We have a main pot file, which is template for other `.po` files
And for each language listed in `po/LINGUAS` we have a corresponding `.po` file
We have a main pot file, which is template for other `.po` files
And for each language listed in `po/LINGUAS` we have a corresponding `.po` file
Regenerate these files when any translatable string added/changed/removed

```bash
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
<hr />

<a href="https://docs.usebottles.com">Documentation</a> ·
<a href="https://forum.usebottles.com">Forums</a> ·
<a href="https://discord.gg/wF4JAdYrTR">Discord</a> ·
<a href="https://forum.usebottles.com">Forums</a> ·
<a href="https://discord.gg/wF4JAdYrTR">Discord</a> ·
<a href="https://usebottles.com/funding">Funding</a>
</div>

Expand Down
1 change: 0 additions & 1 deletion bottles/backend/globals.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

import os
import shutil
from functools import lru_cache
from pathlib import Path
from typing import Dict
from bottles.backend.utils import yaml, json
Expand Down
3 changes: 1 addition & 2 deletions bottles/backend/managers/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import shutil
import tarfile
from functools import lru_cache
from typing import Union, Optional
from typing import Optional

import pycurl

Expand All @@ -45,7 +45,6 @@

# noinspection PyTypeChecker
class ComponentManager:

def __init__(self, manager, offline: bool = False):
self.__manager = manager
self.__repo = manager.repository_manager.get_repo("components", offline)
Expand Down
1 change: 0 additions & 1 deletion bottles/backend/managers/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@


class ConfigManager(object):

def __init__(
self,
config_file: Optional[str] = None,
Expand Down
1 change: 0 additions & 1 deletion bottles/backend/managers/dependency.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@


class DependencyManager:

def __init__(self, manager, offline: bool = False):
self.__manager = manager
self.__repo = manager.repository_manager.get_repo("dependencies", offline)
Expand Down
1 change: 0 additions & 1 deletion bottles/backend/managers/epicgamesstore.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@


class EpicGamesStoreManager:

@staticmethod
def find_dat_path(config: BottleConfig) -> Union[str, None]:
"""
Expand Down
1 change: 0 additions & 1 deletion bottles/backend/managers/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@


class ImportManager:

def __init__(self, manager):
self.manager = manager

Expand Down
1 change: 0 additions & 1 deletion bottles/backend/managers/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@


class InstallerManager:

def __init__(self, manager, offline: bool = False):
self.__manager = manager
self.__repo = manager.repository_manager.get_repo("installers", offline)
Expand Down
1 change: 0 additions & 1 deletion bottles/backend/managers/origin.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@


class OriginManager:

@staticmethod
def find_manifests_path(config: BottleConfig) -> Union[str, None]:
"""
Expand Down
1 change: 0 additions & 1 deletion bottles/backend/managers/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@


class RuntimeManager:

@staticmethod
@lru_cache
def get_runtimes(_filter: str = "bottles"):
Expand Down
1 change: 0 additions & 1 deletion bottles/backend/managers/sandbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@


class SandboxManager:

def __init__(
self,
envs: Optional[dict] = None,
Expand Down
1 change: 0 additions & 1 deletion bottles/backend/managers/steamgriddb.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@


class SteamGridDBManager:

@staticmethod
def get_game_grid(name: str, config: BottleConfig):
try:
Expand Down
1 change: 0 additions & 1 deletion bottles/backend/managers/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@


class TemplateManager:

@staticmethod
def new(env: str, config: BottleConfig):
env = env.lower()
Expand Down
1 change: 0 additions & 1 deletion bottles/backend/managers/thumbnail.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@


class ThumbnailManager:

@staticmethod
def get_path(config: BottleConfig, uri: str):
if uri.startswith("grid:"):
Expand Down
1 change: 0 additions & 1 deletion bottles/backend/managers/ubisoftconnect.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@


class UbisoftConnectManager:

@staticmethod
def find_conf_path(config: BottleConfig) -> Union[str, None]:
"""
Expand Down
1 change: 0 additions & 1 deletion bottles/backend/models/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

# noinspection PyDataclass
class DictCompatMixIn:

@staticmethod
def yaml_serialize_handler(dumper, data):
dict_repr = data.to_dict()
Expand Down
1 change: 0 additions & 1 deletion bottles/backend/utils/display.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class DisplayUtils:

@staticmethod
@lru_cache
def get_x_display():
Expand Down
3 changes: 2 additions & 1 deletion bottles/backend/utils/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
from typing import Union
from array import array


class FileUtils:
"""
This class provide some useful methods to work with files.
Expand Down Expand Up @@ -124,7 +125,7 @@ def chattr_f(directory: str) -> bool:
if os.path.isdir(directory) and len(os.listdir(directory)) == 0:
fd = os.open(directory, os.O_RDONLY)
try:
arg = array('L', [0])
arg = array("L", [0])
fcntl.ioctl(fd, FS_IOC_GETFLAGS, arg, True)
arg[0] |= FS_CASEFOLD_FL
fcntl.ioctl(fd, FS_IOC_SETFLAGS, arg, True)
Expand Down
4 changes: 2 additions & 2 deletions bottles/backend/utils/json.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def dump(
fp: IO[str],
*,
indent: Optional[str | int] = None,
cls: Optional[Type[_json.JSONEncoder]] = None
cls: Optional[Type[_json.JSONEncoder]] = None,
) -> None:
"""
Serialize obj as a JSON formatted stream to fp (a .write()-supporting file-like object).
Expand All @@ -50,7 +50,7 @@ def dumps(
obj: Any,
*,
indent: Optional[str | int] = None,
cls: Optional[Type[_json.JSONEncoder]] = None
cls: Optional[Type[_json.JSONEncoder]] = None,
) -> str:
"""
Serialize obj to a JSON formatted str.
Expand Down
3 changes: 1 addition & 2 deletions bottles/backend/utils/lnk.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@


class LnkUtils:

@staticmethod
@lru_cache
def get_data(path):
Expand Down Expand Up @@ -53,7 +52,7 @@ def get_data(path):
length = struct.unpack("I", content[last_pos:position])[0]

"""
Skip 12 bytes (LinkInfoHeaderSize, LinkInfoFlags and
Skip 12 bytes (LinkInfoHeaderSize, LinkInfoFlags and
VolumeIDOffset)
"""
position += 0x0C
Expand Down
1 change: 0 additions & 1 deletion bottles/backend/utils/proc.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ def kill(self):


class ProcUtils:

@staticmethod
def get_procs():
procs = []
Expand Down
Loading

0 comments on commit 1dd9237

Please sign in to comment.