Skip to content

Commit

Permalink
changed pyright config from yaml to toml
Browse files Browse the repository at this point in the history
  • Loading branch information
efroemling committed Apr 26, 2024
1 parent 5afb918 commit 39c9b07
Show file tree
Hide file tree
Showing 9 changed files with 52 additions and 57 deletions.
56 changes: 28 additions & 28 deletions .efrocachemap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions .idea/dictionaries/ericf.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### 1.7.34 (build 21820, api 8, 2024-04-25)
### 1.7.34 (build 21821, api 8, 2024-04-25)
- Bumped Python version from 3.11 to 3.12 for all builds and project tools. One
of the things this means is that we can use `typing.override` instead of the
`typing_extensions` version so the annoying requirement of installing
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1265,7 +1265,7 @@ tools/bacloud: tools/efrotools/genwrapper.py tools/efrotools/pyver.py
.mypy.ini: config/toolconfigsrc/mypy.ini $(TOOL_CFG_SRC)
@$(TOOL_CFG_INST) $< $@

.pyrightconfig.json: config/toolconfigsrc/pyrightconfig.yaml $(TOOL_CFG_SRC)
.pyrightconfig.json: config/toolconfigsrc/pyrightconfig.toml $(TOOL_CFG_SRC)
@$(TOOL_CFG_INST) $< $@

# Set this to 1 to skip environment checks.
Expand Down
16 changes: 16 additions & 0 deletions config/toolconfigsrc/pyrightconfig.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Pyright's actual config is a json file but we're using yaml here so we
# can include lovely comments (yaml is a superset of json) and then we
# bake it down into a json file.

# For now I'm listing explicit things here. Once we get everything
# passing we can autogenerate the include list like we do for other
# checkers.
include = [ 'tools' ]

# Ideally we should get to 'strict' for everying if we want to consider
# leaning on this as much as we do mypy.
typeCheckingMode = 'basic'

reportMissingTypeStubs = true
stubPath = 'src/stubs'
pythonPlatform = 'Linux'
19 changes: 0 additions & 19 deletions config/toolconfigsrc/pyrightconfig.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion src/assets/ba_data/python/baenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

# Build number and version of the ballistica binary we expect to be
# using.
TARGET_BALLISTICA_BUILD = 21820
TARGET_BALLISTICA_BUILD = 21821
TARGET_BALLISTICA_VERSION = '1.7.34'


Expand Down
2 changes: 1 addition & 1 deletion src/ballistica/shared/ballistica.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ auto main(int argc, char** argv) -> int {
namespace ballistica {

// These are set automatically via script; don't modify them here.
const int kEngineBuildNumber = 21820;
const int kEngineBuildNumber = 21821;
const char* kEngineVersion = "1.7.34";
const int kEngineApiVersion = 8;

Expand Down
6 changes: 3 additions & 3 deletions tools/efrotools/toolconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ def install_tool_config(projroot: Path, src: Path, dst: Path) -> None:
# Special case: if we've got a src .yaml and a dst .json, convert.
# This can be handy to add annotations/etc. in the src which isn't
# possible with json.
if src.suffix == '.yaml' and dst.suffix == '.json':
import yaml
if src.suffix == '.toml' and dst.suffix == '.json':
import tomllib
import json

with src.open(encoding='utf-8') as infile:
contents = yaml.safe_load(infile.read())
contents = tomllib.loads(infile.read())
cfg = json.dumps(contents, indent=2, sort_keys=True)

# In normal cases we just push the source file straight through.
Expand Down

0 comments on commit 39c9b07

Please sign in to comment.