def invalid_marker(text):
 try:
  evaluate_marker(text)
 except SyntaxError as e:
  e.filename = None
  e.lineno = None
  return e
 return False

def invalid_marker ( text ) : try : evaluate_marker ( text ) except SyntaxError as e : e . filename = None e . lineno = None return e return False
validate text as a pep 508 environment marker; return an exception if invalid or false otherwise .