erp5_core: formatting fixes in Base_generateYearDomain

- Remove trailing whitespaces
- Follow guidelines
- Fixup types
2 jobs for for_testrunner_3
Status Job ID Name Coverage
  External
failed ERP5.UnitTest-Master

failed ERP5.UnitTest-Master.Medusa