Selfie
Loading...
Searching...
No Matches
selfie_lib.Literals.Language Class Reference
Inheritance diagram for selfie_lib.Literals.Language:

Public Member Functions

"Language" from_filename (cls, str filename)
 

Static Public Attributes

 PYTHON = auto()
 

Detailed Description

Definition at line 12 of file Literals.py.

Member Function Documentation

◆ from_filename()

"Language" selfie_lib.Literals.Language.from_filename (   cls,
str  filename 
)

Definition at line 16 of file Literals.py.

16 def from_filename(cls, filename: str) -> "Language":
17 extension = filename.rsplit(".", 1)[-1]
18 if extension == "py":
19 return cls.PYTHON
20 else:
21 raise ValueError(f"Unknown language for file {filename}")
22
23

Member Data Documentation

◆ PYTHON

selfie_lib.Literals.Language.PYTHON = auto()
static

Definition at line 13 of file Literals.py.


The documentation for this class was generated from the following file: