Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 8 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Write Your Python Program - CHANGELOG

* ? (?)
* Fix bug with union of unions
* 1.2.1 (2024-11-05)
* Fix assets for visualization
* 1.2.0 (2024-11-04)
* Support for visualization
* Fix handling of lazy annotations in records
* Fix output of execution fails but some tests were successful
* 1.1.0 (2024-10-02)
* Improve invocation on windows, always use cmd.exe
* Fixed bugs #132, #133, #134, and #135
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ body {
.floating-right-content {
width: 65%;
padding: 10px;
min-height: 450px;
max-height: 90%;
}

Expand All @@ -31,7 +30,6 @@ body {
width: 35%;
padding: 10px;
max-height: 90%;
min-height: 450px;
margin-right: 100px;
}

Expand Down
7 changes: 0 additions & 7 deletions package-lock.json

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

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "Write Your Python Program!",
"description": "A user friendly python environment for beginners",
"license": "See license in LICENSE",
"version": "1.1.0",
"version": "1.2.1",
"publisher": "StefanWehr",
"icon": "icon.png",
"engines": {
Expand Down Expand Up @@ -81,7 +81,6 @@
},
"dependencies": {
"@types/node": "^18.11.13",
"leader-line": "^1.0.7",
"stringify-json": "^2.0.0",
"tmp": "^0.2.3",
"ts-md5": "^1.3.1"
Expand Down
2 changes: 1 addition & 1 deletion python/deps/untypy/untypy/impl/union.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def describe(self) -> str:
def base_type(self) -> list[Any]:
out = []
for checker in self.inner:
out.append(checker.base_type())
out.extend(checker.base_type())
return out


Expand Down
1 change: 1 addition & 0 deletions python/fileTests
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ checkWithOutputAux yes 0 test-data/testUnion3.py
checkWithOutputAux yes 1 test-data/testLiteral1.py
checkWithOutputAux yes 0 test-data/testForwardTypeInRecord.py
checkWithOutputAux yes 0 test-data/testForwardTypeInRecord2.py
checkWithOutputAux yes 0 test-data/testUnionOfUnion.py

function is_min_version()
{
Expand Down
Empty file.
3 changes: 3 additions & 0 deletions python/test-data/testUnionOfUnion.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pizza: Napoli
noodles: Penne
beer: Export
31 changes: 31 additions & 0 deletions python/test-data/testUnionOfUnion.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
from wypp import *

@record
class Pizza:
nameP: str

@record
class Noodles:
nameN: str

type Food = Union[Pizza, Noodles]

@record
class Beer:
nameB: str

type All = Union[Food, Beer]

def foo(a: All):
if isinstance(a, Pizza):
print(f'pizza: {a.nameP}')
elif isinstance(a, Noodles):
print(f'noodles: {a.nameN}')
elif isinstance(a, Beer):
print(f'beer: {a.nameB}')
else:
impossible()

foo(Pizza('Napoli'))
foo(Noodles('Penne'))
foo(Beer('Export'))
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { HTMLGenerator } from './HTMLGenerator';
import { MessagePort } from 'worker_threads';
import { cacheTrace } from '../trace_cache';

const FRONTEND_RESOURCE_PATH = 'src/programflow-visualization/frontend/resources';
const FRONTEND_RESOURCE_PATH = 'media/programflow-visualization';

export class VisualizationPanel {
private _panel: vscode.WebviewPanel | undefined;
Expand Down
Loading