mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-24 04:14:44 +00:00

## Summary These have the potential to be much more efficient, as we've seen in the past.
17 lines
491 B
Rust
17 lines
491 B
Rust
/// Returns `true` if `name` is a valid `__future__` feature name, as defined by
|
|
/// `__future__.all_feature_names`.
|
|
pub fn is_feature_name(name: &str) -> bool {
|
|
matches!(
|
|
name,
|
|
"nested_scopes"
|
|
| "generators"
|
|
| "division"
|
|
| "absolute_import"
|
|
| "with_statement"
|
|
| "print_function"
|
|
| "unicode_literals"
|
|
| "barry_as_FLUFL"
|
|
| "generator_stop"
|
|
| "annotations"
|
|
)
|
|
}
|