Skip to content
This repository has been archived by the owner on Feb 14, 2024. It is now read-only.

Commit

Permalink
More fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jtpio committed Oct 5, 2023
1 parent 1cbc4b2 commit 38fd183
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
1 change: 0 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

extensions = [
"jupyterlite_sphinx",
"myst_parser",
Expand Down
4 changes: 3 additions & 1 deletion jupyterlite_xeus_python/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
# the package from a stable release or in editable mode: https://pip.pypa.io/en/stable/topics/local-project-installs/#editable-installs
import warnings

warnings.warn("Importing 'jupyterlite-xeus-python' outside a proper installation.")
warnings.warn(
"Importing 'jupyterlite-xeus-python' outside a proper installation.", stacklevel=2
)
__version__ = "dev"


Expand Down
8 changes: 6 additions & 2 deletions jupyterlite_xeus_python/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
]

PLATFORM = "emscripten-32"
DEFAULT_REQUEST_TIMEOUT = 1 # in minutes


def create_env(
Expand Down Expand Up @@ -127,7 +128,8 @@ def _install_pip_dependencies(prefix_path, dependencies, log=None):
if log is not None:
log.warning(
"""
Installing pip dependencies. This is very much experimental so use this feature at your own risks.
Installing pip dependencies. This is very much experimental so use
this feature at your own risks.
Note that you can only install pure-python packages.
pip is being run with the --no-deps option to not pull undesired system-specific dependencies, so please
install your package dependencies from emscripten-forge or conda-forge.
Expand Down Expand Up @@ -294,7 +296,9 @@ def build_and_pack_emscripten_env(
if empack_config:
empack_config_is_url = urlparse(empack_config).scheme in ("http", "https")
if empack_config_is_url:
empack_config_content = requests.get(empack_config).content
empack_config_content = requests.get(
empack_config, timeout=DEFAULT_REQUEST_TIMEOUT
).content
pack_kwargs["file_filters"] = PkgFileFilter.parse_obj(
yaml.safe_load(empack_config_content)
)
Expand Down
6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ target-version = ["py38"]
target-version = "py38"
exclude = [
"*/tests/*",
"docs/source/tools/*",
"docs",
]
line-length = 100
select = [
Expand All @@ -122,7 +122,9 @@ ignore = [
# PLR0913 Too many arguments to function call
"PLR0913",
# extended flake8 ignore
"D104", "D100", "EM101"
"D104", "D100", "EM101",
# Probable insecure usage of temporary file or directory
"S108"
]

[tool.ruff.per-file-ignores]
Expand Down

0 comments on commit 38fd183

Please sign in to comment.