class DataProcessor:
"""
DataProcessor handles data transformation and validation
"""
def __init__(self):
self.cache = {}
def process_data(self, data):
"""
Processes raw data and returns cleaned result
Args:
data: Raw input data to process
Returns:
Processed and validated data
"""
if not data:
return None
return self._clean_data(data)
# Missing documentation - should be flagged as low priority (private)
def _clean_data(self, data):
return {k: v.strip() if isinstance(v, str) else v for k, v in data.items()}
def validate_email(email):
"""Validates email format"""
return '@' in email and '.' in email
# No documentation at all
def format_date(date_string):
from datetime import datetime
return datetime.strptime(date_string, '%Y-%m-%d')
def calculate_age(birth_year):
from datetime import datetime
current_year = datetime.now().year
return current_year - birth_year