Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
ded4840
data: Update screenshots
TheEvilSkeleton Jan 15, 2025
d0d35d6
appstream: Add brand colors
TheEvilSkeleton Jan 15, 2025
b9f37e1
appstream: Update developer name
TheEvilSkeleton Jan 15, 2025
7d55049
appstream: Use sentence case for summary
TheEvilSkeleton Jan 15, 2025
1f1dc75
appstream: Add screenshot captions
TheEvilSkeleton Jan 15, 2025
02f669b
bottle-row: Rename to BottleRow
TheEvilSkeleton Jan 12, 2025
5f238b7
new-bottle-dialog: Rename to NewBottleDialog
TheEvilSkeleton Jan 12, 2025
870bdd9
check-row: Rename to CheckRow
TheEvilSkeleton Jan 12, 2025
f08dc05
component-entry-row: Rename files and class name
TheEvilSkeleton Jan 12, 2025
458e293
dependency-entry-row: Rename files and class name
TheEvilSkeleton Jan 12, 2025
ac5d0cb
bottle-details-view: Rename files and class name
TheEvilSkeleton Jan 12, 2025
fb234ae
bottle-details-page: Rename files and class name
TheEvilSkeleton Jan 12, 2025
55ef374
details-preferences-page: Rename files and class name
TheEvilSkeleton Jan 12, 2025
10fc8bb
details-task-manager-view: Rename files and class name
TheEvilSkeleton Jan 12, 2025
2014a98
details-versioning-page: Rename files and class name
TheEvilSkeleton Jan 12, 2025
98534f3
bottle-picker-dialog: Rename files
TheEvilSkeleton Jan 12, 2025
65f7350
crash-report-dialog: Rename files
TheEvilSkeleton Jan 12, 2025
b88a4fc
details-dependencies-view: Rename files and class name
TheEvilSkeleton Jan 12, 2025
e4d8c02
details-installers-view: Rename files and class name
TheEvilSkeleton Jan 12, 2025
a5fcad3
dependencies-check-dialog: Rename files
TheEvilSkeleton Jan 12, 2025
6cda10f
display-dialog: Rename files
TheEvilSkeleton Jan 12, 2025
8fbea93
dll-overrides-dialog: Rename files
TheEvilSkeleton Jan 12, 2025
8e17eec
drives-dialog: Rename files
TheEvilSkeleton Jan 12, 2025
4f46b2c
duplicate-dialog: Rename files
TheEvilSkeleton Jan 12, 2025
a762b68
exclusion-patterns-dialog: Rename files
TheEvilSkeleton Jan 12, 2025
b266d17
gamescope-dialog: Rename files
TheEvilSkeleton Jan 12, 2025
508e626
exclusion-pattern-row: Rename files and class name
TheEvilSkeleton Jan 12, 2025
854c31a
fsr-dialog: Rename files and add to POTFILES
TheEvilSkeleton Jan 12, 2025
9451be7
importer-view: Rename files
TheEvilSkeleton Jan 12, 2025
5043948
importer-row: Rename files and class name
TheEvilSkeleton Jan 12, 2025
54988cc
installer-row: Rename files and class name
TheEvilSkeleton Jan 13, 2025
f2a84b4
library-view: Rename files and add to POTFILES
TheEvilSkeleton Jan 13, 2025
5558984
bottles-list-view: Rename files and class name
TheEvilSkeleton Jan 13, 2025
aa2a59d
loading-view: Rename files
TheEvilSkeleton Jan 13, 2025
c5bbdbe
local-resource-row: Rename class name
TheEvilSkeleton Jan 13, 2025
c8f8135
onboard-dialog: Rename files
TheEvilSkeleton Jan 13, 2025
ea587df
program-row: Rename files and class name
TheEvilSkeleton Jan 13, 2025
68f6b26
state-row: Rename files and class name
TheEvilSkeleton Jan 13, 2025
4c17c19
task-row: Rename file and class name
TheEvilSkeleton Jan 13, 2025
f3aa6a7
environment-variables-dialog: Rename files
TheEvilSkeleton Jan 13, 2025
c83e262
installer-dialog: Rename files
TheEvilSkeleton Jan 13, 2025
34d26cd
journal-dialog: Rename files
TheEvilSkeleton Jan 13, 2025
9c5f9d0
launch-options-dialog: Rename files
TheEvilSkeleton Jan 13, 2025
bf1e716
mangohud-dialog: Rename files and add to POTFILES
TheEvilSkeleton Jan 13, 2025
b89bbc5
proton-alert-dialog: Rename files
TheEvilSkeleton Jan 13, 2025
93ae9bb
rename-program-dialog: Rename files and class name
TheEvilSkeleton Jan 13, 2025
4711b81
dialog-run-args: Remove file
TheEvilSkeleton Jan 13, 2025
ba72504
sandbox-dialog: Rename files
TheEvilSkeleton Jan 13, 2025
f6e6db7
upgrade-versioning-dialog: Rename files
TheEvilSkeleton Jan 13, 2025
422bab8
vkbasalt-dialog: Rename files
TheEvilSkeleton Jan 13, 2025
7a16788
vmtouch-dialog: Rename files and add to POTFILES
TheEvilSkeleton Jan 13, 2025
3838cd8
library-entry: Rename files
TheEvilSkeleton Jan 16, 2025
468c6c6
frontend: Move files to root of `frontend/`
TheEvilSkeleton Jan 13, 2025
24019db
chore: Add `pyupgrade` as a pre-commit hook
EmoonX Jan 14, 2025
8e12f6d
chore: Run `pyupgrade` for the entire codebase
TheEvilSkeleton Jan 17, 2025
e733cae
chore: Move autoflake above MyPy
TheEvilSkeleton Jan 17, 2025
4f89c2b
filters: Introduce `__set_filter`
EmoonX Jan 19, 2025
c9bef06
filters: Use `__set_filter` private method to every function
EmoonX Jan 19, 2025
aacc50e
frontend: Add support for MIDI SoundFont
EmoonX Jan 19, 2025
0ecdb4b
backend: Add support for MIDI SoundFont
EmoonX Jan 19, 2025
2196756
backend.midi: Manage FluidSynth instances, avoid duplicates
EmoonX Jan 19, 2025
c3d90a3
backend.midi: Make programs choose the right instrument through registry
EmoonX Jan 19, 2025
9cb7d06
backend.midi: Delete instances not in use by any running programs
EmoonX Jan 19, 2025
76139e2
chore: Bump requirements and update pypi-deps
EmoonX Jan 19, 2025
9605655
Translations update from Hosted Weblate (#3522)
weblate Jan 20, 2025
d192da2
flatpak: Update libadwaita to 1.7.beta
TheEvilSkeleton Jan 31, 2025
b327ce9
flatpak: Remove runtime
TheEvilSkeleton Jan 31, 2025
85ed94c
flatpak: Update vte to 0.78.3
TheEvilSkeleton Jan 31, 2025
930cc3f
flatpak: Update blueprint-compiler to 0.16.0
TheEvilSkeleton Jan 31, 2025
737dd41
flatpak: Update libportal to 0.9.0
TheEvilSkeleton Jan 31, 2025
52338ca
flatpak: Update ImageMagick to 7.1.1-43
TheEvilSkeleton Jan 31, 2025
2093246
flatpak: Update vulkan-tools to vulkan-sdk-1.4.304.0
TheEvilSkeleton Feb 2, 2025
b8fb76d
Remove NVIDIA Flatpak Workaround (#3726)
404NetworkError Feb 3, 2025
723679c
appdata: `translate=no` properties (#3327)
yakushabb Feb 4, 2025
0967184
frontend: Added 'Failed adding to Steam Library dialog' in program_ro…
mhd12e Feb 4, 2025
38a2ff4
program-row: Run formatter
TheEvilSkeleton Feb 9, 2025
420088f
ci: Update image and action
TheEvilSkeleton Feb 9, 2025
3e1dc5b
chore: Update dependency list updater
TheEvilSkeleton Feb 21, 2025
a8fa3b3
bottle-preferences: Split toggle feature callback
TheEvilSkeleton Mar 6, 2025
9875029
Revert "flatpak: Remove runtime"
TheEvilSkeleton Mar 8, 2025
f6e9196
fix: use correct wine path on 10.2 and above (#3800)
lagodimos Mar 10, 2025
ca52527
chore: Update dependency list updater (again)
TheEvilSkeleton Mar 9, 2025
547fcd8
Update PyPI dependencies
github-actions[bot] Feb 21, 2025
d035e3b
Update vulkan-headers, vulkan-tools, libportal and vte modules
github-actions[bot] Feb 21, 2025
ced72cb
bottle-row: Set can-target and can-focus to false
TheEvilSkeleton Mar 14, 2025
b2c6025
desktop: Add more categories
TheEvilSkeleton Mar 17, 2025
aafe54b
appstream: Add categories
TheEvilSkeleton Mar 17, 2025
47f8790
desktop: Use sentence case for comment
TheEvilSkeleton Mar 17, 2025
daa3cb5
desktop: Add more keywords
TheEvilSkeleton Mar 17, 2025
8875b2b
flatpak: Update dependencies
TheEvilSkeleton Mar 27, 2025
a43311d
Added an extra input box to the gamescope popup to facilitate advance…
themen098s Apr 1, 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
4 changes: 2 additions & 2 deletions .github/workflows/build_flatpak.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ jobs:
name: "build-packages"
runs-on: ubuntu-latest
container:
image: bilelmoussaoui/flatpak-github-actions:gnome-47
image: ghcr.io/flathub-infra/flatpak-github-actions:gnome-48
options: --privileged
steps:
- uses: actions/checkout@v4
- uses: bilelmoussaoui/flatpak-github-actions/flatpak-builder@v6
- uses: flathub-infra/flatpak-github-actions/flatpak-builder@master
with:
bundle: bottles.flatpak
manifest-path: build-aux/com.usebottles.bottles.Devel.json
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/update-manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ jobs:
git config user.name "github-actions[bot]"
pur -r requirements.txt
pur -r requirements.dev.txt
req2flatpak --requirements-file requirements.txt --yaml --target-platforms 312-x86_64 -o com.usebottles.bottles.pypi-deps.yaml
git diff ${{ github.ref_name }} --exit-code requirements.txt requirements.dev.txt com.usebottles.bottles.pypi-deps.yaml
req2flatpak --requirements-file requirements.txt --yaml --target-platforms 312-x86_64 -o build-aux/pypi-deps.yaml
git diff ${{ github.ref_name }} --exit-code requirements.txt requirements.dev.txt build-aux/pypi-deps.yaml
updated=$?
if [ $updated -ne 0 ]; then
git add requirements.txt requirements.dev.txt com.usebottles.bottles.pypi-deps.yaml
git add requirements.txt requirements.dev.txt pypi-deps
git commit -m "Update PyPI dependencies"
fi

Expand Down
18 changes: 12 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,27 @@ repos:
args: ["--autofix", "--no-sort-keys", "--indent", "4"]
- id: check-added-large-files

- repo: https://github.com/asottile/pyupgrade
rev: v3.19.1
hooks:
- id: pyupgrade
args: ["--py312-plus"]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.2
hooks:
- id: ruff
args: [ "--fix" ]
- id: ruff-format

- repo: https://github.com/PyCQA/autoflake
rev: v2.3.1
hooks:
- id: autoflake

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.13.0
hooks:
- id: mypy
args: ["--pretty"]
additional_dependencies: ["pygobject-stubs", "types-PyYAML", "types-Markdown", "types-requests", "types-pycurl", "types-chardet", "pytest-stub", "types-orjson", "pathvalidate", "requirements-parser", "icoextract", "fvs", "patool", "git+https://gitlab.com/TheEvilSkeleton/vkbasalt-cli.git@main"]

- repo: https://github.com/PyCQA/autoflake
rev: v2.3.1
hooks:
- id: autoflake
additional_dependencies: ["pygobject-stubs", "types-PyYAML", "types-Markdown", "types-requests", "types-pycurl", "types-chardet", "pytest-stub", "types-orjson", "pathvalidate", "requirements-parser", "icoextract", "fvs", "patool", "pyfluidsynth", "git+https://gitlab.com/TheEvilSkeleton/vkbasalt-cli.git@main"]
2 changes: 1 addition & 1 deletion CODING_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pytest .
Regenerate PYPI dependency manifest when requirements.txt changed

```bash
python ./build-aux/flatpak-pip-generator.py --runtime org.gnome.Sdk -r requirements.txt -o com.usebottles.bottles.pypi-deps --yaml
python ./build-aux/req2flatpak/req2flatpak.py --requirements-file requirements.txt --yaml --target-platforms 312-x86_64 -o build-aux/pypi-deps.yaml
```

## I18n files
Expand Down
3 changes: 1 addition & 2 deletions bottles/backend/cabextract.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import shlex
import shutil
import subprocess
from typing import Optional

from bottles.backend.logger import Logger

Expand Down Expand Up @@ -47,7 +46,7 @@ def run(
self,
path: str,
name: str = "",
files: Optional[list] = None,
files: list | None = None,
destination: str = "",
):
if files is None:
Expand Down
3 changes: 1 addition & 2 deletions bottles/backend/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import shutil
import sys
import time
from typing import Optional

import requests

Expand All @@ -38,7 +37,7 @@ class Downloader:
"""

def __init__(
self, url: str, file: str, update_func: Optional[TaskStreamUpdateHandler] = None
self, url: str, file: str, update_func: TaskStreamUpdateHandler | None = None
):
self.start_time = None
self.url = url
Expand Down
5 changes: 2 additions & 3 deletions bottles/backend/globals.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import os
import shutil
from pathlib import Path
from typing import Dict
from bottles.backend.utils import yaml, json


Expand Down Expand Up @@ -82,12 +81,12 @@ class TrdyPaths:
vmtouch_available = shutil.which("vmtouch") or False
base_version = ""
if os.path.isfile("/app/manifest.json"):
with open("/app/manifest.json", mode="r", encoding="utf-8") as file:
with open("/app/manifest.json", encoding="utf-8") as file:
base_version = (
json.load(file) # type: ignore
.get("base-version", "")
.removeprefix("stable-")
)

# encoding detection correction, following windows defaults
locale_encodings: Dict[str, str] = {"ja_JP": "cp932", "zh_CN": "gbk"}
locale_encodings: dict[str, str] = {"ja_JP": "cp932", "zh_CN": "gbk"}
7 changes: 3 additions & 4 deletions bottles/backend/managers/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import shutil
import tarfile
from functools import lru_cache
from typing import Optional

import pycurl

Expand Down Expand Up @@ -131,7 +130,7 @@ def download(
file: str,
rename: str = "",
checksum: str = "",
func: Optional[TaskStreamUpdateHandler] = None,
func: TaskStreamUpdateHandler | None = None,
) -> bool:
"""Download a component from the Bottles repository."""

Expand Down Expand Up @@ -274,7 +273,7 @@ def extract(name: str, component: str, archive: str) -> bool:
root_dir = tar.getnames()[0]
tar.extractall(path)
tar.close()
except (tarfile.TarError, IOError, EOFError):
except (tarfile.TarError, OSError, EOFError):
with contextlib.suppress(FileNotFoundError):
os.remove(os.path.join(Paths.temp, archive))
with contextlib.suppress(FileNotFoundError):
Expand All @@ -301,7 +300,7 @@ def install(
self,
component_type: str,
component_name: str,
func: Optional[TaskStreamUpdateHandler] = None,
func: TaskStreamUpdateHandler | None = None,
):
"""
This function is used to install a component. It automatically
Expand Down
13 changes: 6 additions & 7 deletions bottles/backend/managers/conf.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
import os
from configparser import ConfigParser
from typing import Optional

from bottles.backend.utils import yaml, json


class ConfigManager(object):
class ConfigManager:
def __init__(
self,
config_file: Optional[str] = None,
config_file: str | None = None,
config_type: str = "ini",
config_string: Optional[str] = None,
config_string: str | None = None,
):
self.config_file = config_file
self.config_string = config_string
Expand Down Expand Up @@ -44,10 +43,10 @@ def read(self):
# noinspection PyProtectedMember
res = config._sections
elif self.config_type == "json":
with open(self.config_file, "r") as f:
with open(self.config_file) as f:
res = json.load(f)
elif self.config_type == "yaml" or self.config_type == "yml":
with open(self.config_file, "r") as f:
with open(self.config_file) as f:
res = yaml.load(f)
else:
raise ValueError("Invalid configuration type")
Expand Down Expand Up @@ -94,7 +93,7 @@ def write_ini(self):
with open(self.config_file, "w") as f:
config.write(f)

def write_dict(self, config_file: Optional[str] = None):
def write_dict(self, config_file: str | None = None):
if self.config_file is None and config_file is None:
raise ValueError("No config path specified")
elif self.config_file is None and config_file is not None:
Expand Down
2 changes: 1 addition & 1 deletion bottles/backend/managers/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __init__(self):

def __get_data(self):
try:
with open(self.__p_data, "r") as s:
with open(self.__p_data) as s:
self.__data = yaml.load(s)
if self.__data is None:
raise AttributeError
Expand Down
4 changes: 3 additions & 1 deletion bottles/backend/managers/dependency.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ def install(self, config: BottleConfig, dependency: list) -> Result:
task_id = TaskManager.add(Task(title=dependency[0]))

logging.info(
"Installing dependency [%s] in bottle [%s]." % (dependency[0], config.Name),
"Installing dependency [{}] in bottle [{}].".format(
dependency[0], config.Name
),
)
manifest = self.get_dependency(dependency[0])
if not manifest:
Expand Down
2 changes: 1 addition & 1 deletion bottles/backend/managers/epicgamesstore.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def get_installed_games(config: BottleConfig) -> list:
if dat_path is None:
return []

with open(dat_path, "r") as dat:
with open(dat_path) as dat:
data = json.load(dat)

for game in data["InstallationList"]:
Expand Down
3 changes: 1 addition & 2 deletions bottles/backend/managers/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import subprocess
import uuid
from functools import lru_cache
from typing import Optional

import markdown
import pycurl
Expand Down Expand Up @@ -358,7 +357,7 @@ def install(
installer: dict,
step_fn: callable,
is_final: bool = True,
local_resources: Optional[dict] = None,
local_resources: dict | None = None,
):
manifest = self.get_installer(installer[0])
_config = config
Expand Down
5 changes: 2 additions & 3 deletions bottles/backend/managers/journal.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import shutil
import uuid
from datetime import datetime, timedelta
from typing import Optional

from bottles.backend.globals import Paths
from bottles.backend.utils import yaml
Expand Down Expand Up @@ -52,7 +51,7 @@ def __get_journal() -> dict:
with open(JournalManager.path, "w") as f:
yaml.dump({}, f)

with open(JournalManager.path, "r") as f:
with open(JournalManager.path) as f:
try:
journal = yaml.load(f)
except yaml.YAMLError:
Expand Down Expand Up @@ -100,7 +99,7 @@ def __clean_old():
JournalManager.__save_journal(journal)

@staticmethod
def __save_journal(journal: Optional[dict] = None):
def __save_journal(journal: dict | None = None):
"""Save the journal to the journal file."""
if journal is None:
journal = JournalManager.__get_journal()
Expand Down
2 changes: 1 addition & 1 deletion bottles/backend/managers/library.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def load_library(self, silent=False):
self.__library = {}
self.save_library()
else:
with open(self.library_path, "r") as library_file:
with open(self.library_path) as library_file:
self.__library = yaml.load(library_file)

if self.__library is None:
Expand Down
23 changes: 12 additions & 11 deletions bottles/backend/managers/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
from datetime import datetime
from gettext import gettext as _
from glob import glob
from typing import Any, Dict, List, Optional
from typing import Any

import pathvalidate

Expand Down Expand Up @@ -91,7 +91,7 @@ class Manager(metaclass=Singleton):
vkd3d_available = []
nvapi_available = []
latencyflex_available = []
local_bottles: Dict[str, BottleConfig] = {}
local_bottles: dict[str, BottleConfig] = {}
supported_runtimes = {}
supported_winebridge = {}
supported_wine_runners = {}
Expand Down Expand Up @@ -413,7 +413,7 @@ def check_runners(self, install_latest: bool = True) -> bool:

if len(self.runners_available) > 0:
logging.info(
"Runners found:\n - {0}".format("\n - ".join(self.runners_available))
"Runners found:\n - {}".format("\n - ".join(self.runners_available))
)

tmp_runners = [x for x in self.runners_available if not x.startswith("sys-")]
Expand Down Expand Up @@ -464,7 +464,7 @@ def check_runtimes(self, install_latest: bool = True) -> bool:
manifest = os.path.join(Paths.runtimes, runtime, "manifest.yml")

if os.path.exists(manifest):
with open(manifest, "r") as f:
with open(manifest) as f:
data = yaml.load(f)
version = data.get("version")
if version:
Expand Down Expand Up @@ -493,7 +493,7 @@ def check_winebridge(

version_file = os.path.join(Paths.winebridge, "VERSION")
if os.path.exists(version_file):
with open(version_file, "r") as f:
with open(version_file) as f:
version = f.read().strip()
if version:
self.winebridge_available = [f"winebridge-{version}"]
Expand Down Expand Up @@ -630,7 +630,7 @@ def __check_component(

if len(component["available"]) > 0:
logging.info(
"{0}s found:\n - {1}".format(
"{}s found:\n - {}".format(
component_type.capitalize(), "\n - ".join(component["available"])
)
)
Expand Down Expand Up @@ -663,7 +663,7 @@ def __check_component(
except ValueError:
return sorted(component["available"], reverse=True)

def get_programs(self, config: BottleConfig) -> List[dict]:
def get_programs(self, config: BottleConfig) -> list[dict]:
"""
Get the list of programs (both from the drive and the user defined
in the bottle configuration file).
Expand Down Expand Up @@ -725,6 +725,7 @@ def get_programs(self, config: BottleConfig) -> List[dict]:
"pre_script": _program.get("pre_script"),
"post_script": _program.get("post_script"),
"folder": _program.get("folder", program_folder),
"midi_soundfont": _program.get("midi_soundfont"),
"dxvk": _program.get("dxvk"),
"vkd3d": _program.get("vkd3d"),
"dxvk_nvapi": _program.get("dxvk_nvapi"),
Expand Down Expand Up @@ -825,7 +826,7 @@ def process_bottle(bottle):
_config = os.path.join(_bottle, "bottle.yml")

if os.path.exists(_placeholder):
with open(_placeholder, "r") as f:
with open(_placeholder) as f:
try:
placeholder_yaml = yaml.load(f)
if placeholder_yaml.get("Path"):
Expand Down Expand Up @@ -951,7 +952,7 @@ def process_bottle(bottle):

if len(self.local_bottles) > 0 and not silent:
logging.info(
"Bottles found:\n - {0}".format("\n - ".join(self.local_bottles))
"Bottles found:\n - {}".format("\n - ".join(self.local_bottles))
)

if (
Expand Down Expand Up @@ -1138,7 +1139,7 @@ def create_bottle(
sandbox: bool = False,
fn_logger: callable = None,
arch: str = "win64",
custom_environment: Optional[str] = None,
custom_environment: str | None = None,
) -> Result[dict]:
"""
Create a new bottle from the given arguments.
Expand Down Expand Up @@ -1392,7 +1393,7 @@ def components_check():
env = Samples.environments[environment.lower()]
elif custom_environment:
try:
with open(custom_environment, "r") as f:
with open(custom_environment) as f:
env = yaml.load(f.read())
logging.warning("Using a custom environment recipe…")
log_update(_("(!) Using a custom environment recipe…"))
Expand Down
Loading