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

feat: Reimplement expr as a class that is understood by IDEs #3466

Merged
merged 23 commits into from
Jul 20, 2024
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
0813874
fix: Use absolute imports explicitly
dangotbanned Jul 9, 2024
bcb8f1d
refactor: remove dynamic globals manipulation
dangotbanned Jul 9, 2024
ec32938
feat: Reimplement `expr` as a class w/ identicial semantics as the si…
dangotbanned Jul 9, 2024
b634913
fix: use absolute imports in `test_expr`
dangotbanned Jul 9, 2024
02fccf5
test(perf): rewrite `expr` tests to run in parallel
dangotbanned Jul 9, 2024
77a2073
test: confirm `expr` constants stay constant
dangotbanned Jul 9, 2024
fe09616
chore(typing): add ignores not flagged by mypy
dangotbanned Jul 9, 2024
8a80357
docs: adds `alt.expr` to API Reference
dangotbanned Jul 9, 2024
2b7a2b3
test: ensure `test_expr_consts_immutable` pattern works for all versions
dangotbanned Jul 9, 2024
e1182d4
Merge branch 'main' into expr-non-dynamic
dangotbanned Jul 9, 2024
34430a0
docs: fix typos, regex artifacts, apply some `ruff` `D` rules
dangotbanned Jul 10, 2024
c360965
Merge branch 'main' into expr-non-dynamic
dangotbanned Jul 13, 2024
448f1cf
Merge branch 'main' into expr-non-dynamic
dangotbanned Jul 13, 2024
4b2e0c2
Merge branch 'main' into expr-non-dynamic
dangotbanned Jul 15, 2024
ed6a819
Merge branch 'main' into expr-non-dynamic
dangotbanned Jul 16, 2024
a33d075
docs: add doc for `_ConstExpressionType`
dangotbanned Jul 16, 2024
f4e7b65
test: make `expr` doctest testable
dangotbanned Jul 16, 2024
7c29281
Merge branch 'main' into expr-non-dynamic
dangotbanned Jul 18, 2024
7185238
Merge branch 'main' into expr-non-dynamic
dangotbanned Jul 19, 2024
08448d1
fix: re-run `generate-schema-wrapper`
dangotbanned Jul 19, 2024
65b527a
refactor: Remove `expr` test dependency on constants
dangotbanned Jul 19, 2024
f78c401
Merge remote-tracking branch 'upstream/main' into expr-non-dynamic
dangotbanned Jul 19, 2024
ece2738
style: remove trailing commas in `@pytest.mark.parametrize`
dangotbanned Jul 19, 2024
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
13 changes: 4 additions & 9 deletions altair/__init__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
# ruff: noqa
__version__ = "5.4.0dev"

from typing import Any

# Necessary as mypy would see expr as the module alt.expr although due to how
# the imports are set up it is expr in the alt.expr module
expr: Any


# The content of __all__ is automatically written by
# tools/update_init_file.py. Do not modify directly.
Expand Down Expand Up @@ -617,11 +611,12 @@ def __dir__():
return __all__


from .vegalite import *
from .jupyter import JupyterChart
from altair.vegalite import *
from altair.jupyter import JupyterChart
from altair.expr import expr


def load_ipython_extension(ipython):
from ._magics import vegalite
from altair._magics import vegalite

ipython.register_magic_function(vegalite, "cell")
Loading