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

Assignment to exc in soft scope is ambiguous #905

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Assignment to exc in soft scope is ambiguous #905

wants to merge 1 commit into from

Conversation

heetbeet
Copy link

@heetbeet heetbeet commented Jun 2, 2021

Suppress warning:

┌ Warning: Assignment to `#6#exc` in soft scope is ambiguous because a global variable by the same name exists: `#6#exc` will be treated as a new local. Disambiguate by using `local #6#exc` to suppress this warning or `global #6#exc` to assign to the existing global variable.
└ @ C:\Users\simon\devel\empty_app\bin\julia\localdepot\packages\PyCall\BD546\src\PyCall.jl:654

Suppress warning:

```
┌ Warning: Assignment to `#6#exc` in soft scope is ambiguous because a global variable by the same name exists: `#6#exc` will be treated as a new local. Disambiguate by using `local #6#exc` to suppress this warning or `global #6#exc` to assign to the existing global variable.
└ @ C:\Users\simon\devel\empty_app\bin\julia\localdepot\packages\PyCall\BD546\src\PyCall.jl:654
```
@codecov-commenter
Copy link

codecov-commenter commented Jun 3, 2021

Codecov Report

Merging #905 (9c7e90a) into master (8a98fb4) will decrease coverage by 0.42%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #905      +/-   ##
==========================================
- Coverage   68.03%   67.60%   -0.43%     
==========================================
  Files          20       20              
  Lines        1980     1982       +2     
==========================================
- Hits         1347     1340       -7     
- Misses        633      642       +9     
Flag Coverage Δ
unittests 67.60% <100.00%> (-0.43%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/PyCall.jl 68.40% <100.00%> (-1.66%) ⬇️
src/pyinit.jl 79.59% <0.00%> (-3.07%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8a98fb4...9c7e90a. Read the comment docs.

@stevengj
Copy link
Member

stevengj commented Jun 3, 2021

This isn't the correct fix because it only works for @pywith statements in global scope.

@stevengj
Copy link
Member

stevengj commented Jun 3, 2021

The right fix is probably to wrap the whole try .. finally in a let exc=true block.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants