It looks like you'd like to initialize the value of a static class variable using a static function from that same class as it's being defined. You can do this using the following syntax taken from this answer but with an added parameter:
class X:
@staticmethod
def do_something(par):
return par
static_var = do_something.__func__(5)
print(X.static_var) # => 5
Referencing a static method of the class X directly inside the X definition fails because X doesn't yet exist. However, since you have defined the @staticmethod do_something, you can call its __func__ attribute with the parameter and assign the result to static_var.
If you're using Python >= 3.10, you don't need the .__func__ property. static_var = do_something(5) will work just fine.
Having said that, more information about the underlying design goal you're trying to implement could reveal a better approach.
par?paris a parameter indo_somethingand you're trying to useparoutside of that definition.parin your method so just get rid of it.