Skip to content

Conversation

@Avasam
Copy link
Contributor

@Avasam Avasam commented May 4, 2025

No description provided.

@Avasam Avasam force-pushed the mypy--fix-all-assignment branch 2 times, most recently from 246817b to e14b212 Compare May 4, 2025 17:10
@Avasam Avasam force-pushed the mypy--fix-all-assignment branch from e14b212 to ca326ca Compare October 17, 2025 15:42
if value and self.repeat.get(attr) is not None:
value = getattr(object, attr, 0) + 1
setattr(object, attr, value)
self.option_order.append((opt, value))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +327 to +336
assert isinstance(cc, str)
assert isinstance(cxx, str)
assert isinstance(cflags, str)
assert isinstance(ccshared, str)
assert isinstance(ldshared, str)
assert isinstance(ldcxxshared, str)
assert isinstance(shlib_suffix, str)
assert isinstance(ar_flags, str)
ar = os.environ.get('AR', ar)
assert isinstance(ar, str)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#366 (comment)

I'm not sure these changes are stable. I'm worried there are edge cases that would begin to fail with this change. Let's be confident that this change doesn't break anything (and consider using casts to retain the current behavior if appropriate).

#343 (comment)

I'm not sure these assertions will always pass. There have been some bugs around these being undefined in unusual environments. Maybe it makes sense to catch these conditions early. Do we have good reason to believe that non-string values returned here would never be viable (would be breaking anyway)?

@Avasam Avasam force-pushed the mypy--fix-all-assignment branch from ca326ca to d4fdab6 Compare November 2, 2025 16:42
@Avasam Avasam mentioned this pull request Nov 2, 2025

# Medium-easy stuff: same syntax/semantics, different names.
ext.runtime_library_dirs = build_info.get('rpath')
ext.runtime_library_dirs = build_info.get('rpath') or []
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Runtime change: avoid assigning None to runtime_library_dirs (I didn't fully investigate whether that should even be possible at runtime or just an artefact of code that is too dynamic to be type-safe)

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.

1 participant